wasm-audio-worklet
example faulty? Initializes 2nd thread in web context in which you can't block
#4426
Labels
wasm-audio-worklet
example faulty? Initializes 2nd thread in web context in which you can't block
#4426
Describe the Bug
In the docs for the wasm-audio-worklet you mention that the same caveats for the "parallel raytracing" apply. In those, you mention the following caveat:
Looking at the code of the wasm-audio-worklet example, you call in
index.html
:and then in
worklet.js
:Like the main thread, the
AudioWorklet
is a context in which you can't block usingAtomics.wait
.Could it be that the example is incorrect, and could in theory sporadically throw due to
Atomics.wait
being executed in the worklet node?Steps to Reproduce
In theory, the example deployed here should throw sporadically, but we've been unable to observe it doing so.
Instead, we see it throwing regularly in our own project, which has a much more involved setup, with multiple threads spawning in:
We observe the
initSync
call in the worklet node throwing in particular if:Expected Behavior
The example to be constructed in such a way that even with a more involved rust codebase, it never throws. Or at the very least, mention the caveat that the way the example is setup, it could throw sporadically.
Actual Behavior
It could throw sporadically, especially in more involved setups. The error looks something like this:
Additional Context
Summary of the above:
The text was updated successfully, but these errors were encountered: