Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Anyone interested in coroutines for JavaScript? | Better HN
Anyone interested in coroutines for JavaScript?
(dl.dropboxusercontent.com)
1 points · by
voodooattack
· 10y ago · 5 comments
Comments
[–]
bikamonki
10y ago
The fact that console is logging from xfrom y on the same line means both executed at the same time?
[–]
voodooattack
OP
10y ago
Yeah, they're all executing on different cores.
[–]
bikamonki
10y ago
But why then are there skipped (empty) lines on the console (that seem to correspond to the parallel executions)? Strange behaviour.
[–]
voodooattack
OP
10y ago
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.