summaryrefslogtreecommitdiff
path: root/src/ctx.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-08-12 08:16:18 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-08-25 15:39:20 +0200
commit936dbf956b0f1471a96fc06bcba67765257dbc4a (patch)
treeb23704ec1d4d6f8c6c94e55919fcfcc1d0f26d6a /src/ctx.hpp
parent76bd6e73c335dbebd8bd30565f83a810058f2cc8 (diff)
dezombification procedure fixed
Diffstat (limited to 'src/ctx.hpp')
-rw-r--r--src/ctx.hpp12
1 files changed, 8 insertions, 4 deletions
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 <vector>
#include <set>
#include <map>
+#include <list>
+#include <vector>
#include <string>
#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 <socket_base_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 <socket_base_t> zombies_t;
+ typedef std::list <socket_base_t*> zombies_t;
zombies_t zombies;
// List of unused slots.