News for hackers. Stuff that matters.
Re:Anyone interested in coroutines for JavaScript? by voodooattack on Saturday April 09, 2016 @08:52PM (#11464222)
Yeah, they're all executing on different cores.
Re:Anyone interested in coroutines for JavaScript? by bikamonki on Saturday April 09, 2016 @10:53PM (#11464626)
But why then are there skipped (empty) lines on the console (that seem to correspond to the parallel executions)? Strange behaviour.
Re:Anyone interested in coroutines for JavaScript? by voodooattack on Saturday April 09, 2016 @11:05PM (#11464667)
This happens when there is no synchronization involved, the engine is printing line endings in a separate operation, so they come out weird like that. I'll add a mutex locking mechanism on console I/O at some point in the future.
Re:Anyone interested in coroutines for JavaScript? by bikamonki on Sunday April 10, 2016 @02:46AM (#11465213)
I see. One advantage over web workers is that the DOM would be accesible so this could be used to speed up views rendering.