Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
6357890f
Commit
6357890f
authored
Aug 07, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed code duplication in process_commands
parent
da8024d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
socket_base.cpp
src/socket_base.cpp
+5
-9
No files found.
src/socket_base.cpp
View file @
6357890f
...
...
@@ -1317,12 +1317,7 @@ void zmq::socket_base_t::start_reaping (poller_t *poller_)
int
zmq
::
socket_base_t
::
process_commands
(
int
timeout_
,
bool
throttle_
)
{
int
rc
;
command_t
cmd
;
if
(
timeout_
!=
0
)
{
// If we are asked to wait, simply ask mailbox to wait.
rc
=
_mailbox
->
recv
(
&
cmd
,
timeout_
);
}
else
{
if
(
timeout_
==
0
)
{
// If we are asked not to wait, check whether we haven't processed
// commands recently, so that we can throttle the new commands.
...
...
@@ -1343,11 +1338,12 @@ int zmq::socket_base_t::process_commands (int timeout_, bool throttle_)
return
0
;
_last_tsc
=
tsc
;
}
// Check whether there are any commands pending for this thread.
rc
=
_mailbox
->
recv
(
&
cmd
,
0
);
}
// Check whether there are any commands pending for this thread.
command_t
cmd
;
int
rc
=
_mailbox
->
recv
(
&
cmd
,
timeout_
);
// Process all available commands.
while
(
rc
==
0
)
{
cmd
.
destination
->
process_command
(
cmd
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment