Replies: 1 comment 2 replies
-
There are multiple ways I guess
// func to be called from Dart
fn my_func() {
MY_GOOD_THREAD.execute(|| {
// things that need to use one single thread
});
}
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I'm trying to wrap some rust code that calls native windows API's. The API I'm calling wants all the functions on a specific handle to be called from the same thread (at least I believe that). It also seems to require that the thread that created the handle stays alive.
From the documentation I figured that in order to make all rust calls run in the same "worker" thread (which might be a solution here, right? ), I might have to modify FLUTTER_RUST_BRIDGE_HANDLER, but looking at its default implementation ...
flutter_rust_bridge/frb_rust/src/for_generated/boilerplate.rs
Line 209 in b72240e
... I'm a bit puzzled how I could achieve that and if it's even possible ?
Or maybe there's another solution to achieve what I want without fiddling with the default handler?
Beta Was this translation helpful? Give feedback.
All reactions