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
Joshua Jung edited this page Feb 24, 2017
·
3 revisions
The Parallel executor (src) lets you run a set of executors at the same time (similar to Promise.all).
Note: this example uses the Sleep executor.
controller.addListener('doABunchOfThingsFast', [
() => {console.log('I'm so busy, I'm doing 5 things at once!');},
[ // This second layered array indicates the contained executors are to be run at the same time
100,
1000, // This one will complete last
300,
50,
1
],
() => {console.log('Whoops, I fell asleep for a second.');}
]);