mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-19 08:46:44 +01:00
Rename terminated->pipe_terminated
This commit is contained in:
parent
7a43c02aaf
commit
c3e40736de
@ -108,10 +108,10 @@ void zmq::dealer_t::xwrite_activated (pipe_t *pipe_)
|
||||
lb.activated (pipe_);
|
||||
}
|
||||
|
||||
void zmq::dealer_t::xterminated (pipe_t *pipe_)
|
||||
void zmq::dealer_t::xpipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
fq.terminated (pipe_);
|
||||
lb.terminated (pipe_);
|
||||
fq.pipe_terminated (pipe_);
|
||||
lb.pipe_terminated (pipe_);
|
||||
}
|
||||
|
||||
zmq::dealer_session_t::dealer_session_t (io_thread_t *io_thread_, bool connect_,
|
||||
|
@ -53,7 +53,7 @@ namespace zmq
|
||||
bool xhas_out ();
|
||||
void xread_activated (zmq::pipe_t *pipe_);
|
||||
void xwrite_activated (zmq::pipe_t *pipe_);
|
||||
void xterminated (zmq::pipe_t *pipe_);
|
||||
void xpipe_terminated (zmq::pipe_t *pipe_);
|
||||
|
||||
private:
|
||||
|
||||
|
@ -74,7 +74,7 @@ void zmq::dist_t::unmatch ()
|
||||
matching = 0;
|
||||
}
|
||||
|
||||
void zmq::dist_t::terminated (pipe_t *pipe_)
|
||||
void zmq::dist_t::pipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
// Remove the pipe from the list; adjust number of matching, active and/or
|
||||
// eligible pipes accordingly.
|
||||
|
@ -54,7 +54,7 @@ namespace zmq
|
||||
void unmatch ();
|
||||
|
||||
// Removes the pipe from the distributor object.
|
||||
void terminated (zmq::pipe_t *pipe_);
|
||||
void pipe_terminated (zmq::pipe_t *pipe_);
|
||||
|
||||
// Send the message to the matching outbound pipes.
|
||||
int send_to_matching (zmq::msg_t *msg_);
|
||||
|
@ -41,7 +41,7 @@ void zmq::fq_t::attach (pipe_t *pipe_)
|
||||
active++;
|
||||
}
|
||||
|
||||
void zmq::fq_t::terminated (pipe_t *pipe_)
|
||||
void zmq::fq_t::pipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
const pipes_t::size_type index = pipes.index (pipe_);
|
||||
|
||||
|
@ -40,7 +40,7 @@ namespace zmq
|
||||
|
||||
void attach (pipe_t *pipe_);
|
||||
void activated (pipe_t *pipe_);
|
||||
void terminated (pipe_t *pipe_);
|
||||
void pipe_terminated (pipe_t *pipe_);
|
||||
|
||||
int recv (msg_t *msg_);
|
||||
int recvpipe (msg_t *msg_, pipe_t **pipe_);
|
||||
|
@ -41,7 +41,7 @@ void zmq::lb_t::attach (pipe_t *pipe_)
|
||||
activated (pipe_);
|
||||
}
|
||||
|
||||
void zmq::lb_t::terminated (pipe_t *pipe_)
|
||||
void zmq::lb_t::pipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
pipes_t::size_type index = pipes.index (pipe_);
|
||||
|
||||
|
@ -38,7 +38,7 @@ namespace zmq
|
||||
|
||||
void attach (pipe_t *pipe_);
|
||||
void activated (pipe_t *pipe_);
|
||||
void terminated (pipe_t *pipe_);
|
||||
void pipe_terminated (pipe_t *pipe_);
|
||||
|
||||
int send (msg_t *msg_);
|
||||
bool has_out ();
|
||||
|
@ -49,7 +49,7 @@ void zmq::pair_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_)
|
||||
pipe_->terminate (false);
|
||||
}
|
||||
|
||||
void zmq::pair_t::xterminated (pipe_t *pipe_)
|
||||
void zmq::pair_t::xpipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
if (pipe_ == pipe)
|
||||
pipe = NULL;
|
||||
|
@ -47,7 +47,7 @@ namespace zmq
|
||||
bool xhas_out ();
|
||||
void xread_activated (zmq::pipe_t *pipe_);
|
||||
void xwrite_activated (zmq::pipe_t *pipe_);
|
||||
void xterminated (zmq::pipe_t *pipe_);
|
||||
void xpipe_terminated (zmq::pipe_t *pipe_);
|
||||
|
||||
private:
|
||||
|
||||
|
@ -285,7 +285,7 @@ void zmq::pipe_t::process_pipe_term_ack ()
|
||||
{
|
||||
// Notify the user that all the references to the pipe should be dropped.
|
||||
zmq_assert (sink);
|
||||
sink->terminated (this);
|
||||
sink->pipe_terminated (this);
|
||||
|
||||
// In term_ack_sent and term_req_sent2 states there's nothing to do.
|
||||
// Simply deallocate the pipe. In term_req_sent1 state we have to ack
|
||||
|
@ -50,7 +50,7 @@ namespace zmq
|
||||
virtual void read_activated (zmq::pipe_t *pipe_) = 0;
|
||||
virtual void write_activated (zmq::pipe_t *pipe_) = 0;
|
||||
virtual void hiccuped (zmq::pipe_t *pipe_) = 0;
|
||||
virtual void terminated (zmq::pipe_t *pipe_) = 0;
|
||||
virtual void pipe_terminated (zmq::pipe_t *pipe_) = 0;
|
||||
};
|
||||
|
||||
// Note that pipe can be stored in three different arrays.
|
||||
|
@ -46,9 +46,9 @@ void zmq::pull_t::xread_activated (pipe_t *pipe_)
|
||||
fq.activated (pipe_);
|
||||
}
|
||||
|
||||
void zmq::pull_t::xterminated (pipe_t *pipe_)
|
||||
void zmq::pull_t::xpipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
fq.terminated (pipe_);
|
||||
fq.pipe_terminated (pipe_);
|
||||
}
|
||||
|
||||
int zmq::pull_t::xrecv (msg_t *msg_)
|
||||
|
@ -47,7 +47,7 @@ namespace zmq
|
||||
int xrecv (zmq::msg_t *msg_);
|
||||
bool xhas_in ();
|
||||
void xread_activated (zmq::pipe_t *pipe_);
|
||||
void xterminated (zmq::pipe_t *pipe_);
|
||||
void xpipe_terminated (zmq::pipe_t *pipe_);
|
||||
|
||||
private:
|
||||
|
||||
|
@ -46,9 +46,9 @@ void zmq::push_t::xwrite_activated (pipe_t *pipe_)
|
||||
lb.activated (pipe_);
|
||||
}
|
||||
|
||||
void zmq::push_t::xterminated (pipe_t *pipe_)
|
||||
void zmq::push_t::xpipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
lb.terminated (pipe_);
|
||||
lb.pipe_terminated (pipe_);
|
||||
}
|
||||
|
||||
int zmq::push_t::xsend (msg_t *msg_)
|
||||
|
@ -47,7 +47,7 @@ namespace zmq
|
||||
int xsend (zmq::msg_t *msg_);
|
||||
bool xhas_out ();
|
||||
void xwrite_activated (zmq::pipe_t *pipe_);
|
||||
void xterminated (zmq::pipe_t *pipe_);
|
||||
void xpipe_terminated (zmq::pipe_t *pipe_);
|
||||
|
||||
private:
|
||||
|
||||
|
@ -106,7 +106,7 @@ int zmq::router_t::xsetsockopt (int option_, const void *optval_,
|
||||
}
|
||||
|
||||
|
||||
void zmq::router_t::xterminated (pipe_t *pipe_)
|
||||
void zmq::router_t::xpipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
std::set <pipe_t*>::iterator it = anonymous_pipes.find (pipe_);
|
||||
if (it != anonymous_pipes.end ())
|
||||
@ -115,7 +115,7 @@ void zmq::router_t::xterminated (pipe_t *pipe_)
|
||||
outpipes_t::iterator it = outpipes.find (pipe_->get_identity ());
|
||||
zmq_assert (it != outpipes.end ());
|
||||
outpipes.erase (it);
|
||||
fq.terminated (pipe_);
|
||||
fq.pipe_terminated (pipe_);
|
||||
if (pipe_ == current_out)
|
||||
current_out = NULL;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ namespace zmq
|
||||
bool xhas_out ();
|
||||
void xread_activated (zmq::pipe_t *pipe_);
|
||||
void xwrite_activated (zmq::pipe_t *pipe_);
|
||||
void xterminated (zmq::pipe_t *pipe_);
|
||||
void xpipe_terminated (zmq::pipe_t *pipe_);
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -197,7 +197,7 @@ void zmq::session_base_t::clean_pipes ()
|
||||
}
|
||||
}
|
||||
|
||||
void zmq::session_base_t::terminated (pipe_t *pipe_)
|
||||
void zmq::session_base_t::pipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
// Drop the reference to the deallocated pipe if required.
|
||||
zmq_assert (pipe == pipe_ || terminating_pipes.count (pipe_) == 1);
|
||||
|
@ -61,7 +61,7 @@ namespace zmq
|
||||
void read_activated (zmq::pipe_t *pipe_);
|
||||
void write_activated (zmq::pipe_t *pipe_);
|
||||
void hiccuped (zmq::pipe_t *pipe_);
|
||||
void terminated (zmq::pipe_t *pipe_);
|
||||
void pipe_terminated (zmq::pipe_t *pipe_);
|
||||
|
||||
// Delivers a message. Returns 0 if successful; -1 otherwise.
|
||||
// The function takes ownership of the message.
|
||||
|
@ -1003,10 +1003,10 @@ void zmq::socket_base_t::hiccuped (pipe_t *pipe_)
|
||||
xhiccuped (pipe_);
|
||||
}
|
||||
|
||||
void zmq::socket_base_t::terminated (pipe_t *pipe_)
|
||||
void zmq::socket_base_t::pipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
// Notify the specific socket type about the pipe termination.
|
||||
xterminated (pipe_);
|
||||
xpipe_terminated (pipe_);
|
||||
|
||||
// Remove pipe from inproc pipes
|
||||
for (inprocs_t::iterator it = inprocs.begin(); it != inprocs.end(); ++it) {
|
||||
|
@ -100,7 +100,7 @@ namespace zmq
|
||||
void read_activated (pipe_t *pipe_);
|
||||
void write_activated (pipe_t *pipe_);
|
||||
void hiccuped (pipe_t *pipe_);
|
||||
void terminated (pipe_t *pipe_);
|
||||
void pipe_terminated (pipe_t *pipe_);
|
||||
void lock();
|
||||
void unlock();
|
||||
|
||||
@ -145,7 +145,7 @@ namespace zmq
|
||||
virtual void xread_activated (pipe_t *pipe_);
|
||||
virtual void xwrite_activated (pipe_t *pipe_);
|
||||
virtual void xhiccuped (pipe_t *pipe_);
|
||||
virtual void xterminated (pipe_t *pipe_) = 0;
|
||||
virtual void xpipe_terminated (pipe_t *pipe_) = 0;
|
||||
|
||||
// Delay actual destruction of the socket.
|
||||
void process_destroy ();
|
||||
|
@ -102,14 +102,14 @@ int zmq::xpub_t::xsetsockopt (int option_, const void *optval_,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void zmq::xpub_t::xterminated (pipe_t *pipe_)
|
||||
void zmq::xpub_t::xpipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
// Remove the pipe from the trie. If there are topics that nobody
|
||||
// is interested in anymore, send corresponding unsubscriptions
|
||||
// upstream.
|
||||
subscriptions.rm (pipe_, send_unsubscription, this);
|
||||
|
||||
dist.terminated (pipe_);
|
||||
dist.pipe_terminated (pipe_);
|
||||
}
|
||||
|
||||
void zmq::xpub_t::mark_as_matching (pipe_t *pipe_, void *arg_)
|
||||
|
@ -54,7 +54,7 @@ namespace zmq
|
||||
void xread_activated (zmq::pipe_t *pipe_);
|
||||
void xwrite_activated (zmq::pipe_t *pipe_);
|
||||
int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
|
||||
void xterminated (zmq::pipe_t *pipe_);
|
||||
void xpipe_terminated (zmq::pipe_t *pipe_);
|
||||
|
||||
private:
|
||||
|
||||
|
@ -67,10 +67,10 @@ void zmq::xsub_t::xwrite_activated (pipe_t *pipe_)
|
||||
dist.activated (pipe_);
|
||||
}
|
||||
|
||||
void zmq::xsub_t::xterminated (pipe_t *pipe_)
|
||||
void zmq::xsub_t::xpipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
fq.terminated (pipe_);
|
||||
dist.terminated (pipe_);
|
||||
fq.pipe_terminated (pipe_);
|
||||
dist.pipe_terminated (pipe_);
|
||||
}
|
||||
|
||||
void zmq::xsub_t::xhiccuped (pipe_t *pipe_)
|
||||
|
@ -52,7 +52,7 @@ namespace zmq
|
||||
void xread_activated (zmq::pipe_t *pipe_);
|
||||
void xwrite_activated (zmq::pipe_t *pipe_);
|
||||
void xhiccuped (pipe_t *pipe_);
|
||||
void xterminated (zmq::pipe_t *pipe_);
|
||||
void xpipe_terminated (zmq::pipe_t *pipe_);
|
||||
|
||||
private:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user