Open justinbmeyer opened 6 years ago
It can be hard to digest what's going on as a result of can.queues.log("flush").
can.queues.log("flush")
I propose the ability to turn on a slow mode to help see what happens as consequence of an action.
This might be unnecessary once the debugging tools are available. However, this would be easy and helpful.
In short, if someone runs:
can.queues.startSlow(1000);
This will run only one task every 1000ms.
If someone runs:
can.queues.stopSlow()
This will resume running all tasks synchronously.
Currently, the task queue can "run over itself". Meaning that if someone does:
queues.enqueueByQueue({ notify: [function(){ console.log("notifyA"); queues.enqueueByQueue({ notify: [ console.log ] }, null, [ "notifyB"] ); console.log("notifyC"); }], derive: [function(){ console.log("derive"); }] })
This might log:
notifyA notifyB notifyC derive
Slow mode will likely change this to:
notifyA notifyC notifyB derive
It can be hard to digest what's going on as a result of
can.queues.log("flush")
.I propose the ability to turn on a slow mode to help see what happens as consequence of an action.
This might be unnecessary once the debugging tools are available. However, this would be easy and helpful.
In short, if someone runs:
This will run only one task every 1000ms.
If someone runs:
This will resume running all tasks synchronously.
Potential problems
Currently, the task queue can "run over itself". Meaning that if someone does:
This might log:
Slow mode will likely change this to: