gopi-suvanam / scribbler

Scribbler - JavaScript Notebook Tool for experimenting in JavaScript. Runs in the browser without a backend. Discord server: https://discord.gg/uxNSsWunwU
https://scribbler.live
MIT License
67 stars 7 forks source link

Add web-worker capability #10

Closed gopi-suvanam closed 10 months ago

gopi-suvanam commented 1 year ago

Problem Right now the user code runs in the main thread of the application itself. this causes bad user experience because the page hangs for long compute. Also a compute cannot be "killed" midway.

Proposed Solution

Alternatives considered Async function - that still blocks the eventloop

Additional context Jupyter runs the user generated python in a seperate thread called the "kernal" the messages are seamless passed back to the UI. Of course python does not interact with DOMs.

gopi-suvanam commented 10 months ago

run_in and run_in_ww have been added for webworker support.