block js with #[op2] fn without blocking rust thread
I'm using deno_core and I'm looking for a way to block the js main thread without using a sync function to block rust's thread.
Basically what should happen is:
1. op_sleep is called from js.
2. rust pauses the js runtime for 1 second. during this 1 second, rust thread is can still be executing other isolates on the same thread.
3. after 1 second ends, rust resumes the js runtime.
Is this possible using deno_core and op2 or do I need to use lower level apis?
Basically what should happen is:
1. op_sleep is called from js.
2. rust pauses the js runtime for 1 second. during this 1 second, rust thread is can still be executing other isolates on the same thread.
3. after 1 second ends, rust resumes the js runtime.
Is this possible using deno_core and op2 or do I need to use lower level apis?
