chemicstry / wasm_thread

A rust `std::thread` replacement for wasm32 target
Apache License 2.0
123 stars 16 forks source link

Allow posting messages to web workers #9

Open chemicstry opened 2 years ago

chemicstry commented 2 years ago

Currently it's not possible to send/receive messages to/from web workers because library overtakes on_message callbacks.

It would be nice to somehow allow sending custom messages over API. It might also be possible to release on_message callbacks aftrer initialization and use channels for communication inside the library.

This feature would probably need a major rewrite as discussed in https://github.com/chemicstry/wasm_thread/issues/8