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

Allow tasks to be enqueued out of order #21

Closed dtex closed 6 years ago

dtex commented 6 years ago

Temporal had been relying on Object.keys to return the keys in sequential order but the current V8 implementation uses array indexing and our keys are values outside the array index range. As a result, we cannot assume the last entry in the keys will be the greatest queued time value.