4 ms·
I'm particularly impressed by this: > While we do not emulate threads, we still wanted to handle blocking operations, particularly for standard input. Since th
by charliesome 14y ago
I'm particularly impressed by this:
> While we do not emulate threads, we still wanted to handle blocking operations, particularly for standard input. Since the browser DOM is largely asynchronous, blocking operations have to be emulated via async callbacks. We solved this by implementing a 'yield' construct: upon encountering a blocking function, we throw a YieldException to pause the VM. This exception would also contain the asynchronous function that we are waiting on, which eventually calls the VM and resumes the program.
Absolutely brilliant work guys