Currently I am trying to use channels receiver for wasm runtime:
let (sender, receiver) = mpsc::channel();
ehttp::fetch(ehttp::Request::get(&url), move |response: ehttp::Result<ehttp::Response>| {
let result = response.unwrap();
sender.send(result);
});
...
let response = receiver.recv().unwrap();
But it fails with error - panicked at 'condvar wait not supported', library/std/src/sys/wasm/../unsupported/locks/condvar.rs:20:9:
As I get it from other internet resources that it is not possible to use channels in wasm.
Can you please confirm that it is an issue or share an example how it is possible to fetch using channels?
Currently I am trying to use channels receiver for wasm runtime:
But it fails with error - panicked at 'condvar wait not supported', library/std/src/sys/wasm/../unsupported/locks/condvar.rs:20:9:
As I get it from other internet resources that it is not possible to use channels in wasm. Can you please confirm that it is an issue or share an example how it is possible to fetch using channels?