From 936dbf956b0f1471a96fc06bcba67765257dbc4a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 12 Aug 2010 08:16:18 +0200 Subject: dezombification procedure fixed --- src/ctx.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/ctx.hpp') diff --git a/src/ctx.hpp b/src/ctx.hpp index c44cca6..1b51151 100644 --- a/src/ctx.hpp +++ b/src/ctx.hpp @@ -20,9 +20,10 @@ #ifndef __ZMQ_CTX_HPP_INCLUDED__ #define __ZMQ_CTX_HPP_INCLUDED__ -#include #include #include +#include +#include #include #include "signaler.hpp" @@ -52,7 +53,7 @@ namespace zmq // no more sockets open it'll cause all the infrastructure to be shut // down. If there are open sockets still, the deallocation happens // after the last one is closed. - int term (); + int terminate (); // Create a socket. class socket_base_t *create_socket (int type_); @@ -60,6 +61,9 @@ namespace zmq // Make socket a zombie. void zombify_socket (socket_base_t *socket_); + // Kill the zombie socket. + void dezombify_socket (socket_base_t *socket_); + // Send command to the destination slot. void send_command (uint32_t slot_, const command_t &command_); @@ -83,9 +87,9 @@ namespace zmq typedef yarray_t sockets_t; sockets_t sockets; - // Array of sockets that were already closed but not yet deallocated. + // List of sockets that were already closed but not yet deallocated. // These sockets still have some pipes and I/O objects attached. - typedef yarray_t zombies_t; + typedef std::list zombies_t; zombies_t zombies; // List of unused slots. -- cgit v1.2.3