On May 31, 2012, at 1:05 PM, Paddy Byers wrote: > So, it seems to me we do need: > > a) "process_before_already_scheduled_events" - to address the main use-case, > which is Isaac's proposed behaviour for nextTick; > > b) "schedule_after_already_scheduled_events" - to address the use case of > being able to schedule work in parcels that would otherwise preempt event > processing for unbounded time. > > (a) is a critical need, and the "official" purpose of nextTick, so its > current behaviour is broken and it needs fixing to behave this way. There is > an option to introduce a new more meaningful name and deprecate nextTick; but > even then nextTick is obviously never going to go away, so it just needs to > be very carefully documented and the name explained as an unfortunate > artifact of history. > > (b) I believe is a genuine need and hopefully we can think of a good name for > it, and implement it.
onIdle() I have used nextTick where I am doing a background-like task that does not need to be run if there is lots going on, but useful to run when not busy. I had assumed nextTick would let anything that was waiting to run to be run. -- Dick
