| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ccf1b24 commit be34388
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,7 +28,7 @@ functions that can be used to control this default behavior. | |||
| 28 | 28 | added: v9.7.0 | |
| 29 | 29 | --> | |
| 30 | 30 | ||
| 31 | - * Returns: {Immediate} | ||
| 31 | + * Returns: {Immediate} a reference to `immediate` | ||
| 32 | 32 | ||
| 33 | 33 | When called, requests that the Node.js event loop *not* exit so long as the | |
| 34 | 34 | `Immediate` is active. Calling `immediate.ref()` multiple times will have no | |
@@ -37,22 +37,18 @@ effect. | |||
| 37 | 37 | By default, all `Immediate` objects are "ref'ed", making it normally unnecessary | |
| 38 | 38 | to call `immediate.ref()` unless `immediate.unref()` had been called previously. | |
| 39 | 39 | ||
| 40 | - Returns a reference to the `Immediate`. | ||
| 41 | - | ||
| 42 | 40 | ### immediate.unref() | |
| 43 | 41 | <!-- YAML | |
| 44 | 42 | added: v9.7.0 | |
| 45 | 43 | --> | |
| 46 | 44 | ||
| 47 | - * Returns: {Immediate} | ||
| 45 | + * Returns: {Immediate} a reference to `immediate` | ||
| 48 | 46 | ||
| 49 | 47 | When called, the active `Immediate` object will not require the Node.js event | |
| 50 | 48 | loop to remain active. If there is no other activity keeping the event loop | |
| 51 | 49 | running, the process may exit before the `Immediate` object's callback is | |
| 52 | 50 | invoked. Calling `immediate.unref()` multiple times will have no effect. | |
| 53 | 51 | ||
| 54 | - Returns a reference to the `Immediate`. | ||
| 55 | - | ||
| 56 | 52 | ## Class: Timeout | |
| 57 | 53 | ||
| 58 | 54 | This object is created internally and is returned from [`setTimeout()`][] and | |
@@ -70,22 +66,20 @@ control this default behavior. | |||
| 70 | 66 | added: v0.9.1 | |
| 71 | 67 | --> | |
| 72 | 68 | ||
| 73 | - * Returns: {Timeout} | ||
| 69 | + * Returns: {Timeout} a reference to `timeout` | ||
| 74 | 70 | ||
| 75 | 71 | When called, requests that the Node.js event loop *not* exit so long as the | |
| 76 | 72 | `Timeout` is active. Calling `timeout.ref()` multiple times will have no effect. | |
| 77 | 73 | ||
| 78 | 74 | By default, all `Timeout` objects are "ref'ed", making it normally unnecessary | |
| 79 | 75 | to call `timeout.ref()` unless `timeout.unref()` had been called previously. | |
| 80 | 76 | ||
| 81 | - Returns a reference to the `Timeout`. | ||
| 82 | - | ||
| 83 | 77 | ### timeout.unref() | |
| 84 | 78 | <!-- YAML | |
| 85 | 79 | added: v0.9.1 | |
| 86 | 80 | --> | |
| 87 | 81 | ||
| 88 | - * Returns: {Timeout} | ||
| 82 | + * Returns: {Timeout} a reference to `timeout` | ||
| 89 | 83 | ||
| 90 | 84 | When called, the active `Timeout` object will not require the Node.js event loop | |
| 91 | 85 | to remain active. If there is no other activity keeping the event loop running, | |
@@ -96,8 +90,6 @@ Calling `timeout.unref()` creates an internal timer that will wake the Node.js | |||
| 96 | 90 | event loop. Creating too many of these can adversely impact performance | |
| 97 | 91 | of the Node.js application. | |
| 98 | 92 | ||
| 99 | - Returns a reference to the `Timeout`. | ||
| 100 | - | ||
| 101 | 93 | ## Scheduling Timers | |
| 102 | 94 | ||
| 103 | 95 | A timer in Node.js is an internal construct that calls a given function after | |
@@ -113,9 +105,10 @@ added: v0.9.1 | |||
| 113 | 105 | * `callback` {Function} The function to call at the end of this turn of | |
| 114 | 106 | [the Node.js Event Loop] | |
| 115 | 107 | * `...args` {any} Optional arguments to pass when the `callback` is called. | |
| 108 | + * Returns: {Immediate} for use with [`clearImmediate()`][] | ||
| 116 | 109 | ||
| 117 | 110 | Schedules the "immediate" execution of the `callback` after I/O events' | |
| 118 | - callbacks. Returns an `Immediate` for use with [`clearImmediate()`][]. | ||
| 111 | + callbacks. | ||
| 119 | 112 | ||
| 120 | 113 | When multiple calls to `setImmediate()` are made, the `callback` functions are | |
| 121 | 114 | queued for execution in the order in which they are created. The entire callback | |
@@ -155,10 +148,9 @@ added: v0.0.1 | |||
| 155 | 148 | * `delay` {number} The number of milliseconds to wait before calling the | |
| 156 | 149 | `callback`. | |
| 157 | 150 | * `...args` {any} Optional arguments to pass when the `callback` is called. | |
| 158 | - * Returns: {Timeout} | ||
| 151 | + * Returns: {Timeout} for use with [`clearInterval()`][] | ||
| 159 | 152 | ||
| 160 | 153 | Schedules repeated execution of `callback` every `delay` milliseconds. | |
| 161 | - Returns a `Timeout` for use with [`clearInterval()`][]. | ||
| 162 | 154 | ||
| 163 | 155 | When `delay` is larger than `2147483647` or less than `1`, the `delay` will be | |
| 164 | 156 | set to `1`. | |
@@ -174,10 +166,9 @@ added: v0.0.1 | |||
| 174 | 166 | * `delay` {number} The number of milliseconds to wait before calling the | |
| 175 | 167 | `callback`. | |
| 176 | 168 | * `...args` {any} Optional arguments to pass when the `callback` is called. | |
| 177 | - * Returns: {Timeout} | ||
| 169 | + * Returns: {Timeout} for use with [`clearTimeout()`][] | ||
| 178 | 170 | ||
| 179 | 171 | Schedules execution of a one-time `callback` after `delay` milliseconds. | |
| 180 | - Returns a `Timeout` for use with [`clearTimeout()`][]. | ||
| 181 | 172 | ||
| 182 | 173 | The `callback` will likely not be invoked in precisely `delay` milliseconds. | |
| 183 | 174 | Node.js makes no guarantees about the exact timing of when callbacks will fire, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments