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
2a85cce1
Commit
2a85cce1
authored
Oct 01, 2010
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:zeromq/zeromq2
parents
0bb76b66
8f9080eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
zmq.cpp
src/zmq.cpp
+7
-4
No files found.
src/zmq.cpp
View file @
2a85cce1
...
...
@@ -412,14 +412,17 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
}
bool
first_pass
=
true
;
int
timeout
=
timeout_
>
0
?
timeout_
/
1000
:
-
1
;
int
nevents
=
0
;
if
(
timeout_
>=
0
)
timeout_
/=
1000
;
else
timeout_
=
-
1
;
while
(
true
)
{
// Wait for events.
while
(
true
)
{
int
rc
=
poll
(
pollfds
,
nitems_
,
first_pass
?
0
:
timeout
);
int
rc
=
poll
(
pollfds
,
nitems_
,
first_pass
?
0
:
timeout
_
);
if
(
rc
==
-
1
&&
errno
==
EINTR
)
{
free
(
pollfds
);
return
-
1
;
...
...
@@ -466,7 +469,7 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
}
// If there are no events from the first pass (the one with no
// timout), do at least the second pass so that we wait.
// tim
e
out), do at least the second pass so that we wait.
if
(
first_pass
&&
nevents
==
0
&&
timeout_
!=
0
)
{
first_pass
=
false
;
continue
;
...
...
@@ -474,7 +477,7 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
// If timeout is set to infinite and we have to events to return
// we can restart the polling.
if
(
timeout
==
-
1
&&
nevents
==
0
)
if
(
timeout
_
==
-
1
&&
nevents
==
0
)
continue
;
// TODO: if nevents is zero recompute timeout and loop
...
...
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