You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@polygon Looking at the data within each struct, I don't think I can do an unsafe impl Send for _ {} and still be sound. The ALSA documentation states it's thread-safe when compiled with the proper flag, but I want wavy to still be sound when ALSA is compiled without that flag. I've been working on a new version for about a year interspersed with work in many other projects, and hoping to release it soon. Future versions shouldn't take as long.
My current idea is to use a separate thread to run ALSA calls on and send data over a channel. I thought about using flume for this, but I don't want to pull in the https://crates.io/crates/pin-project dependency. I'll make sure to get this in when the new version does come out. In the meantime, if you need a workaround, you should be able to solve the problem the same way - by making an abstraction layer over wavy using channels.
Is your feature request related to a problem? Please describe.
It's really painful to work with e.g. tokio::tasks with non-send types.
Describe the solution you'd like
Implement send for the 4 relevant structs:
Describe alternatives you've considered
Wrapping the structs in user code, very unergonomic.
Additional context
This should be safe without any other changes.
The text was updated successfully, but these errors were encountered: