summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej MaƂecki <me@mmalecki.com>2013-11-12 11:28:44 +0100
committerTimothy J Fontaine <tjfontaine@gmail.com>2013-12-31 14:52:43 -0800
commit5a8de857f0bd05941f54b20415ab7c374c4b1720 (patch)
treeae04e59f0a74a2b4f04008477b47e86895c4ec87
parentffb718b5a36302d98dac1fef683600e621560255 (diff)
downloadnode-5a8de857f0bd05941f54b20415ab7c374c4b1720.tar.gz
doc: document that `process.send` is synchronous
Ref #2598
-rw-r--r--doc/api/child_process.markdown5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown
index 7b51902d3..f9adadc18 100644
--- a/doc/api/child_process.markdown
+++ b/doc/api/child_process.markdown
@@ -194,6 +194,11 @@ And then the child script, `'sub.js'` might look like this:
In the child the `process` object will have a `send()` method, and `process`
will emit objects each time it receives a message on its channel.
+Please note that the `send()` method on both the parent and child are
+synchronous - sending large chunks of data is not advised (pipes can be used
+instead, see
+[`child_process.spawn`](#child_process_child_process_spawn_command_args_options)).
+
There is a special case when sending a `{cmd: 'NODE_foo'}` message. All messages
containing a `NODE_` prefix in its `cmd` property will not be emitted in
the `message` event, since they are internal messages used by node core.