rwaldron / temporal

Non-blocking, temporal task sequencing. For use with robots built with Johnny-Five
http://johnny-five.io/
MIT License
84 stars 12 forks source link

Some tasks are not started #6

Closed mdehaussy closed 10 years ago

mdehaussy commented 10 years ago

Queued tasks are indexed by ms time value, so if a ms time value has been missed between two call of setImmediate, the task corrsponding to the ms time value in queued tasks table is not started.

rwaldron commented 10 years ago

Yeah, I've experienced this before but couldn't consistently reproduce—I also didn't think anyone else was using the library, so I decided to just ignore it ;)

In node v0.12.0+ setImmediate is made far more efficient than v0.10.0, so I don't really know what to do:

I'm game for either. What do you think?

mdehaussy commented 10 years ago

Same problem for me : can't consistenlty reproduce...For now I've chosen option 2 : added logic. I've sent you a pull request. It's a very basic patch that fit my needs. Your comments are welcome !

rwaldron commented 10 years ago

Closed https://github.com/rwaldron/temporal/commit/4aa5a46255d68aaeba7378cdd51b3c3981a4a90c