chris-zen / coremidi

CoreMIDI library for Rust
https://chris-zen.github.io/coremidi/coremidi/
MIT License
75 stars 20 forks source link

Implement Send for BoxedCallback #15

Closed chris-zen closed 5 years ago

chris-zen commented 5 years ago

Related to #14 See https://github.com/chris-zen/coremidi/issues/14#issuecomment-526807730 ping @Boddlnagg

Boddlnagg commented 5 years ago

Yep, I think that's how it should be done. I can't guarantee that it's absolutely correct/sound, but I think that it is, because there's a F: Send bound on the boxed function. So the contained function can be moved between threads, therefore I think the BoxedCallback can also be moved between threads.