From 0f6f7276e32c01ccfe86fb76741a52ac6ffc87af Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 23 May 2011 20:30:01 +0200 Subject: Move the pipe termination code to socket_base_t So far, the pipe termination code was spread among socket type classes, fair queuer, load balancer, etc. This patch moves all the associated logic to a single place. Signed-off-by: Martin Sustrik --- src/own.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/own.cpp') diff --git a/src/own.cpp b/src/own.cpp index cdf20a4..f2ca4b2 100644 --- a/src/own.cpp +++ b/src/own.cpp @@ -153,6 +153,11 @@ void zmq::own_t::terminate () send_term_req (owner, this); } +bool zmq::own_t::is_terminating () +{ + return terminating; +} + void zmq::own_t::process_term (int linger_) { // Double termination should never happen. @@ -173,7 +178,6 @@ void zmq::own_t::process_term (int linger_) void zmq::own_t::register_term_acks (int count_) { term_acks += count_; - printf ("reg %d acks (%p, %d)\n", count_, (void*) this, term_acks); } void zmq::own_t::unregister_term_ack () @@ -181,8 +185,6 @@ void zmq::own_t::unregister_term_ack () zmq_assert (term_acks > 0); term_acks--; - printf ("unreg 1 acks (%p, %d)\n", (void*) this, term_acks); - // This may be a last ack we are waiting for before termination... check_term_acks (); } -- cgit v1.2.3