Closed maxall41 closed 1 year ago
This is by design. Prokio futures are being pinned to 1 thread. All subsequent futures will also be spawned to the same thread. It is faster and smaller to use a pinned sunchronisation. However, it cannot be sent across threads.
If you are considering to use RwLock across threads, you can continue to use tokio::sync.
I'm trying to migrate an existing project from tokio to prokio for WASM support. But I't seems that unlike tokio RwLocks prokio RwLocks can not be sent across threads. Am I just doing something wrong here? Or Is there a reason for this?
Whenever I try to use one I get an error like:
This even happens when not run inside a prokio task for some reason...