buttplugio / buttplug-rs-ffi

FFI from buttplug-rs to Java and other languages
Other
88 stars 22 forks source link

C# Client Sorter Callback should be run context of the .Net Scheduler #58

Closed qdot closed 3 years ago

qdot commented 3 years ago

We currently pass the C# client sorter as a delegate that is run directly by Rust. This means we don't really know what thread context the callback runs on, which can cause weird races in some instances. The delegate we pass across the FFI border should instead just spawn a task into the .Net executor that runs the sorter callback.