weepy/kaffeine — Issue #42: Async bug?
Author: pheze
Created: 2011-12-22 15:28:07+00:00
State: open

This:

sleep = { setTimeout #1, #0 }

for x in [1,2,3]
sleep!(100)
console.log(x)

Results in:

var sleep;

sleep = function() {
return setTimeout(arguments[1], arguments[0]);
};

for (x in [ 1, 2, 3 ]) sleep(100, function() {});

console.log(x);

Shouldn't the console.log be included in the sleep callback?