webr
webr copied to clipboard
same WebR cannot handle multiple Promises
When using serviceworkers WebR has issues processing multiple requests concurrently. This is not an issue when crossOriginIsolated = true. I had to use a workaround to get multiple code blocks to execute properly using a mutex.
demo crossOriginIsolated = false Two promises installing lattice/ggplot2 resolving in parallel and neither returns.
Example output:
bootstrapping
exec m1 with crossOriginIsolated = false
installing lattice to m1
exec m2 with crossOriginIsolated = false
installing ggplot2 to m2
execing m1
finished execing m1
received 30 msgs
So here m2 doesn't finish executing.
This is not an issue with crossOriginIsolated = true, demo2
Great spot that the issue only occurs under the Service Worker channel! That's why I missed reproduction in #255, lesson learned.
I've tagged this as a confirmed bug, thanks for taking the time to build examples.