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
3cca90ea
Commit
3cca90ea
authored
Aug 07, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimized zmq::dish_t::xhas_in
parent
aa1f5739
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
dish.cpp
src/dish.cpp
+8
-10
No files found.
src/dish.cpp
View file @
3cca90ea
...
...
@@ -207,9 +207,9 @@ bool zmq::dish_t::xhas_in ()
if
(
_has_message
)
return
true
;
while
(
true
)
{
do
{
// Get a message using fair queueing algorithm.
int
rc
=
_fq
.
recv
(
&
_message
);
const
int
rc
=
_fq
.
recv
(
&
_message
);
// If there's no message available, return immediately.
// The same when error occurs.
...
...
@@ -218,14 +218,12 @@ bool zmq::dish_t::xhas_in ()
return
false
;
}
// Filtering non matching messages
subscriptions_t
::
iterator
it
=
_subscriptions
.
find
(
std
::
string
(
_message
.
group
()));
if
(
it
!=
_subscriptions
.
end
())
{
_has_message
=
true
;
return
true
;
}
}
// Filter out non matching messages
}
while
(
0
==
_subscriptions
.
count
(
std
::
string
(
_message
.
group
())));
// Matching message found
_has_message
=
true
;
return
true
;
}
const
zmq
::
blob_t
&
zmq
::
dish_t
::
get_credential
()
const
...
...
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