pipe deallocation added

This commit is contained in:
Martin Sustrik
2009-08-28 16:51:46 +02:00
parent 2dd5016515
commit cb09c6951e
12 changed files with 290 additions and 37 deletions

View File

@@ -83,6 +83,14 @@ void zmq::object_t::process_command (command_t &cmd_)
cmd_.args.bind.in_pipe, cmd_.args.bind.out_pipe);
return;
case command_t::pipe_term:
process_pipe_term ();
return;
case command_t::pipe_term_ack:
process_pipe_term_ack ();
return;
case command_t::term_req:
process_term_req (cmd_.args.term_req.object);
return;
@@ -100,6 +108,16 @@ void zmq::object_t::process_command (command_t &cmd_)
}
}
void zmq::object_t::register_pipe (class pipe_t *pipe_)
{
dispatcher->register_pipe (pipe_);
}
void zmq::object_t::unregister_pipe (class pipe_t *pipe_)
{
dispatcher->unregister_pipe (pipe_);
}
zmq::io_thread_t *zmq::object_t::choose_io_thread (uint64_t taskset_)
{
return dispatcher->choose_io_thread (taskset_);
@@ -166,6 +184,22 @@ void zmq::object_t::send_revive (object_t *destination_)
send_command (cmd);
}
void zmq::object_t::send_pipe_term (writer_t *destination_)
{
command_t cmd;
cmd.destination = destination_;
cmd.type = command_t::pipe_term;
send_command (cmd);
}
void zmq::object_t::send_pipe_term_ack (reader_t *destination_)
{
command_t cmd;
cmd.destination = destination_;
cmd.type = command_t::pipe_term_ack;
send_command (cmd);
}
void zmq::object_t::send_term_req (socket_base_t *destination_,
owned_t *object_)
{
@@ -223,6 +257,16 @@ void zmq::object_t::process_revive ()
zmq_assert (false);
}
void zmq::object_t::process_pipe_term ()
{
zmq_assert (false);
}
void zmq::object_t::process_pipe_term_ack ()
{
zmq_assert (false);
}
void zmq::object_t::process_term_req (owned_t *object_)
{
zmq_assert (false);