summaryrefslogtreecommitdiff
path: root/src/node_perf.h
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2017-12-26 14:17:37 -0500
committerAnatoli Papirovski <apapirovski@mac.com>2018-01-02 11:16:33 -0500
commit54062d30cf3550fdb6220fa580724b76da817f32 (patch)
tree6896bdb9fd3e8f49b58ef0919ec79bf2d7966d0f /src/node_perf.h
parent11a1bc11364ea88091b73cec5d5f69bdccb03ac1 (diff)
downloadandroid-node-v8-54062d30cf3550fdb6220fa580724b76da817f32.tar.gz
android-node-v8-54062d30cf3550fdb6220fa580724b76da817f32.tar.bz2
android-node-v8-54062d30cf3550fdb6220fa580724b76da817f32.zip
timers: refactor setImmediate error handling
If an error is encountered during the processing of Immediates, schedule the remaining queue to finish after all error handling code runs (if the process is still alive to do so). The new changes make the Immediates error handling behaviour entirely deterministic and predictable, as the full queue will be flushed on each Immediates cycle, regardless of whether an error is encountered or not. Currently this processing is scheduled for nextTick which can yield unpredictable results as the nextTick might happen as early as close callbacks phase or as late as after the next event loop turns Immediates all fully processed. The latter can result in two full cycles of Immediates processing during one even loop turn. The current implementation also doesn't differentiate between Immediates scheduled for the current queue run or the next one, so Immediates that were scheduled for the next turn of the event loop, will process alongside the ones that were scheduled for the current turn. PR-URL: https://github.com/nodejs/node/pull/17879 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_perf.h')
0 files changed, 0 insertions, 0 deletions