If all I am using is wasm_bindgen_futures* ans futures_*, what is the easiest way to get a semaphore ? Basically, I want a "cell" where:
one async task is waiting for someone to put a value in the cell, and start execution after getting a value
a second async task which can put value into the cell
cell needs to be re-useable
I think you're describing an async channel. You can use the ones in
futures::channel even in
futures::channel::oneshot isn't reusable unless the sender also sends a new oneshot channel along with the data.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.