You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'use strict'consttagg=require('threads_a_gogo')constthread=tagg.create()constpromise=newPromise((resolve)=>{thread.on('event',resolve)thread.eval(`thread.emit('event', 42)`)})promise.then(console.log)// Without this the promise never resolves.setImmediate(()=>{})
If I don't include setImmediate(() => {}) at the end then the promise never resolves and doesn't print 42 to the console. It looks like the main event loop isn't being processed after receiving an event until I kick it with a null setImmediate.
The text was updated successfully, but these errors were encountered:
TAGG: 0.1.13
Node.js: v6.9.5
Check out this strange code:
If I don't include
setImmediate(() => {})
at the end then the promise never resolves and doesn't print42
to the console. It looks like the main event loop isn't being processed after receiving an event until I kick it with a nullsetImmediate
.The text was updated successfully, but these errors were encountered: