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
158d77d6
Commit
158d77d6
authored
Jun 07, 2015
by
Min RK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't check POLLOUT for single-socket proxies
parent
d3bb4508
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
proxy.cpp
src/proxy.cpp
+10
-5
No files found.
src/proxy.cpp
View file @
158d77d6
...
...
@@ -142,10 +142,14 @@ int zmq::proxy (
return
-
1
;
// Get the pollout separately because when combining this with pollin it maxes the CPU
// because pollout shall most of the time return directly
rc
=
zmq_poll
(
&
itemsout
[
0
],
2
,
0
);
if
(
unlikely
(
rc
<
0
))
return
-
1
;
// because pollout shall most of the time return directly.
// POLLOUT is only checked when frontend and backend sockets are not the same.
if
(
frontend_
!=
backend_
)
{
rc
=
zmq_poll
(
&
itemsout
[
0
],
2
,
0
);
if
(
unlikely
(
rc
<
0
))
{
return
-
1
;
}
}
// Process a control command if any
if
(
control_
&&
items
[
2
].
revents
&
ZMQ_POLLIN
)
{
...
...
@@ -180,13 +184,14 @@ int zmq::proxy (
// Process a request
if
(
state
==
active
&&
items
[
0
].
revents
&
ZMQ_POLLIN
&&
itemsout
[
1
].
revents
&
ZMQ_POLLOUT
)
{
&&
(
frontend_
==
backend_
||
itemsout
[
1
].
revents
&
ZMQ_POLLOUT
)
)
{
rc
=
forward
(
frontend_
,
backend_
,
capture_
,
msg
);
if
(
unlikely
(
rc
<
0
))
return
-
1
;
}
// Process a reply
if
(
state
==
active
&&
frontend_
!=
backend_
&&
items
[
1
].
revents
&
ZMQ_POLLIN
&&
itemsout
[
0
].
revents
&
ZMQ_POLLOUT
)
{
rc
=
forward
(
backend_
,
frontend_
,
capture_
,
msg
);
...
...
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