- Mastering Node.js(Second Edition)
- Sandro Pasquali Kevin Faaborg
- 147字
- 2021-07-02 19:28:44
setImmediate
setImmediate is technically a member of the class of timers, along with setInterval and setTimeout . However, there is no sense of time associated with it — there is no number of milliseconds to wait for an argument to be sent.
This method is really more of a sibling to process.nextTick, differing in one very important way: while callbacks queued by nextTick will execute before I/O and timer events, callbacks queued by setImmediate will be called after I/O events.
The naming of these two methods is confusing: Node will actually run the function you give to nextTick before the one you pass to setImmediate.
This method does reflect the standard behavior of timers in that its invocation will return an object that can be passed to clearImmediate, cancelling your request to run your function later on in the same way clearTimeout cancels timers set with setTimeout.
- Aptana Studio Beginner's Guide
- Building E-commerce Sites with VirtueMart Cookbook
- Oracle SOA Suite 11g Performance Tuning Cookbook
- 計算機網絡安全實訓教程(第二版)
- HTML5 Game development with ImpactJS
- 智慧城市中的移動互聯網技術
- 信息通信網絡建設安全管理概要2
- SSL VPN : Understanding, evaluating and planning secure, web/based remote access
- 2018網信發展報告
- 企業網絡安全管理
- Windows Server 2012 Hyper-V虛擬化管理實踐
- 5G技術與標準
- 語音信號處理及Blackfin DSP實現
- 轉化:提升網站流量和轉化率的技巧
- 組網技術與網絡管理