From 67913a023251dfd881b631c4eda8cac9ad79ed3e Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Fri, 18 Feb 2011 18:30:15 -0500 Subject: [PATCH] writable stream api has destroySoon() for exiting after data queue has been drained --- doc/api/streams.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/api/streams.markdown b/doc/api/streams.markdown index 83ad59b..2bc05f3 100644 --- a/doc/api/streams.markdown +++ b/doc/api/streams.markdown @@ -170,3 +170,9 @@ Same as above but with a `buffer`. ### stream.destroy() Closes the underlying file descriptor. Stream will not emit any more events. + +### stream.destroySoon() + +After the write queue is drained, close the file descriptor. `destroySoon()` +can still destroy straight away, as long as there is no data left in the queue +for writes. -- 2.7.4