Jurgis
Jurgis
There is also a way to close worker from inside the rust code, no need to signal javascript poll loop: ```rust pub fn spawn_async(f: F) -> JoinHandle where F: AsyncClosure,...
Yes, implementing async entry points and message posting would deviate too far from `std::thread` API. If we were to implement such features, I think creating a separate crate is the...
I have no experience with electron so I'll be just guessing: - Have you looked at network tab to check if webworker script is loaded? Maybe there is a path...
Thanks for the minimal bug example, I have identified the bug. Before refactoring, main thread was identified as the one that was first to spawn a thread, however, I changed...
@Davidster I would rather avoid hacks with throws. So I looked more into this issue and found something stupid simple, the web worker script has a close call after executing...
In theory, web workers should terminate automatically when there are no items left in worker's event queue (pending async promises) and main thread has dropped worker handle (can no longer...
@adamgerhant could you test it on a new refactored v0.3.0 release? We now have a test for this behavior: https://github.com/chemicstry/wasm_thread/blob/49ae81d67601bdc2e64d8ef96e14c7e62107aa4c/tests/wasm.rs#L102
Yeah the problem here is that `block_on` parks the thread (possibly on atomic wait) and javascript event loop cannot run while the thread is parked. The close call is needed...