summaryrefslogtreecommitdiff
path: root/src/pipe.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-06-23 07:57:47 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-06-23 07:57:47 +0200
commitd1373792f7888f312cd7286fdf524a0bfe124846 (patch)
tree046c7a5473b43b50be02ef34705e2a45e753c51c /src/pipe.hpp
parent12532c7940f23fcb3cd46208c141d47647e76231 (diff)
Outstanding requests dropped when requester dies (issue 190)
So far the requests in req/rep pattern were delivered to and processed by worker even though the original requester was dead. Thus, the worker processing replies with noone to deliver results to. This optimisation drops requests in two situations: 1. Queued inbound requests in XREP socket when peer disconnects. 2. Queued outbound requests in XREQ when socket is closed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/pipe.hpp')
-rw-r--r--src/pipe.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pipe.hpp b/src/pipe.hpp
index df85bc2..437d84d 100644
--- a/src/pipe.hpp
+++ b/src/pipe.hpp
@@ -34,8 +34,9 @@ namespace zmq
// Create a pipepair for bi-directional transfer of messages.
// First HWM is for messages passed from first pipe to the second pipe.
// Second HWM is for messages passed from second pipe to the first pipe.
- // Delay specifies whether the pipe receives all the pending messages
- // before terminating or whether it terminates straight away.
+ // Delay specifies how the pipe behaves when the peer terminates. If true
+ // pipe receives all the pending messages before terminating, otherwise it
+ // terminates straight away.
int pipepair (class object_t *parents_ [2], class pipe_t* pipes_ [2],
int hwms_ [2], bool delays_ [2]);