mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 07:56:09 +00:00
Small code simplification
This commit is contained in:
parent
b0792ec78a
commit
602c50117c
10
src/fq.cpp
10
src/fq.cpp
@ -84,11 +84,6 @@ int zmq::fq_t::recvpipe (msg_t *msg_, pipe_t **pipe_)
|
|||||||
// subsequent part should be immediately available.
|
// subsequent part should be immediately available.
|
||||||
bool fetched = pipes [current]->read (msg_);
|
bool fetched = pipes [current]->read (msg_);
|
||||||
|
|
||||||
// Check the atomicity of the message. If we've already received the
|
|
||||||
// first part of the message we should get the remaining parts
|
|
||||||
// without blocking.
|
|
||||||
zmq_assert (!more || fetched);
|
|
||||||
|
|
||||||
// Note that when message is not fetched, current pipe is deactivated
|
// Note that when message is not fetched, current pipe is deactivated
|
||||||
// and replaced by another active pipe. Thus we don't have to increase
|
// and replaced by another active pipe. Thus we don't have to increase
|
||||||
// the 'current' pointer.
|
// the 'current' pointer.
|
||||||
@ -101,6 +96,11 @@ int zmq::fq_t::recvpipe (msg_t *msg_, pipe_t **pipe_)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check the atomicity of the message.
|
||||||
|
// If we've already received the first part of the message
|
||||||
|
// we should get the remaining parts without blocking.
|
||||||
|
zmq_assert (!more);
|
||||||
|
|
||||||
active--;
|
active--;
|
||||||
pipes.swap (current, active);
|
pipes.swap (current, active);
|
||||||
if (current == active)
|
if (current == active)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user