diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-09-18 06:48:45 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-09-18 06:48:45 +0200 |
commit | fb6ce536d96c82e8f4378a87a5d59aefcc57a96d (patch) | |
tree | 0f1344c2ccdd96a8ae76dbbcb159bcbb9102a916 | |
parent | 0c215fada4f448788069e42bda34609f74c8b64b (diff) |
more details on launch_sibling in comments
-rw-r--r-- | src/own.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/own.cpp b/src/own.cpp index f8252ab..12f50bf 100644 --- a/src/own.cpp +++ b/src/own.cpp @@ -80,13 +80,19 @@ void zmq::own_t::launch_child (own_t *object_) void zmq::own_t::launch_sibling (own_t *object_) { + // At this point it is important that object is plugged in before its + // owner has a chance to terminate it. Thus, 'plug' command is sent before + // the 'own' command. Given that the signaler preserves ordering of + // commands, 'term' command from the owner cannot make it to the object + // before the already written 'plug' command. + // Specify the owner of the object. object_->set_owner (owner); // Plug the object into its I/O thread. send_plug (object_); - // Take ownership of the object. + // Make parent own the object. send_own (owner, object_); } |