Hacker News new | past | comments | ask | show | jobs | submit login

That reminds me of the JavaScript interpreter written in JavaScript (which is used for Scratch, I think) - that supports stepping through multiple instances of the interpreter to achieve a kind of interleaved concurrency.

https://neil.fraser.name/software/JS-Interpreter/docs.html#t...

> JavaScript is single-threaded, but the JS-Interpreter allows one to run multiple threads at the same time. Creating two or more completely independent threads that run separately from each other is trivial: just create two or more instances of the Interpreter, each with its own code, and alternate calling each interpreter's step function. They may communicate indirectly with each other through any external APIs that are provided.

> A more complex case is where two or more threads should share the same global scope..






Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: