| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7aebc69 commit 72adba4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -347,6 +347,8 @@ buffer that would have an adverse impact on performance. In such situations, | |||
| 347 | 347 | implementations that implement the `writable._writev()` method can perform | |
| 348 | 348 | buffered writes in a more optimized manner. | |
| 349 | 349 | ||
| 350 | + See also: [`writable.uncork()`][]. | ||
| 351 | + | ||
| 350 | 352 | ##### writable.end([chunk][, encoding][, callback]) | |
| 351 | 353 | <!-- YAML | |
| 352 | 354 | added: v0.9.4 | |
@@ -394,7 +396,7 @@ added: v0.11.2 | |||
| 394 | 396 | The `writable.uncork()` method flushes all data buffered since | |
| 395 | 397 | [`stream.cork()`][] was called. | |
| 396 | 398 | ||
| 397 | - When using `writable.cork()` and `writable.uncork()` to manage the buffering | ||
| 399 | + When using [`writable.cork()`][] and `writable.uncork()` to manage the buffering | ||
| 398 | 400 | of writes to a stream, it is recommended that calls to `writable.uncork()` be | |
| 399 | 401 | deferred using `process.nextTick()`. Doing so allows batching of all | |
| 400 | 402 | `writable.write()` calls that occur within a given Node.js event loop phase. | |
@@ -406,7 +408,7 @@ stream.write('data '); | |||
| 406 | 408 | process.nextTick(() => stream.uncork()); | |
| 407 | 409 | ``` | |
| 408 | 410 | ||
| 409 | - If the `writable.cork()` method is called multiple times on a stream, the same | ||
| 411 | + If the [`writable.cork()`][] method is called multiple times on a stream, the same | ||
| 410 | 412 | number of calls to `writable.uncork()` must be called to flush the buffered | |
| 411 | 413 | data. | |
| 412 | 414 | ||
@@ -422,6 +424,8 @@ process.nextTick(() => { | |||
| 422 | 424 | }); | |
| 423 | 425 | ``` | |
| 424 | 426 | ||
| 427 | + See also: [`writable.cork()`][]. | ||
| 428 | + | ||
| 425 | 429 | ##### writable.write(chunk[, encoding][, callback]) | |
| 426 | 430 | <!-- YAML | |
| 427 | 431 | added: v0.9.4 | |
@@ -2018,6 +2022,8 @@ readable buffer so there is nothing for a user to consume. | |||
| 2018 | 2022 | [`stream.uncork()`]: #stream_writable_uncork | |
| 2019 | 2023 | [`stream.unpipe()`]: #stream_readable_unpipe_destination | |
| 2020 | 2024 | [`stream.wrap()`]: #stream_readable_wrap_stream | |
| 2025 | + [`writable.cork()`]: #stream_writable_cork | ||
| 2026 | + [`writable.uncork()`]: #stream_writable_uncork | ||
| 2021 | 2027 | [API for Stream Consumers]: #stream_api_for_stream_consumers | |
| 2022 | 2028 | [API for Stream Implementers]: #stream_api_for_stream_implementers | |
| 2023 | 2029 | [child process stdin]: child_process.html#child_process_child_stdin | |
| Back | FazBrowse Home | New Git URL |
0 commit comments