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
08201bc1
Commit
08201bc1
authored
Feb 09, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: select blocks forever under Unix
Solution: fixed call of select, and initialization of poll_t members
parent
a30133d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
12 deletions
+7
-12
select.cpp
src/select.cpp
+7
-7
select.hpp
src/select.hpp
+0
-5
No files found.
src/select.cpp
View file @
08201bc1
...
...
@@ -189,9 +189,9 @@ int zmq::select_t::try_retire_fd_entry (
void
zmq
::
select_t
::
rm_fd
(
handle_t
handle_
)
{
int
retired
=
0
;
#if defined ZMQ_HAVE_WINDOWS
u_short
family
=
get_fd_family
(
handle_
);
int
retired
=
0
;
if
(
family
!=
AF_UNSPEC
)
{
family_entries_t
::
iterator
family_entry_it
=
family_entries
.
find
(
family
);
...
...
@@ -411,7 +411,7 @@ void zmq::select_t::loop ()
}
}
#else
select_family_entry
(
family_entry
,
maxfd
,
timeout
>
0
,
tv
);
select_family_entry
(
family_entry
,
maxfd
+
1
,
timeout
>
0
,
tv
);
#endif
}
zmq_stopwatch_stop
(
stopwatch
);
...
...
@@ -523,6 +523,11 @@ bool zmq::select_t::is_retired_fd (const fd_entry_t &entry)
return
(
entry
.
fd
==
retired_fd
);
}
zmq
::
select_t
::
family_entry_t
::
family_entry_t
()
:
has_retired
(
false
)
{
}
#if defined ZMQ_HAVE_WINDOWS
u_short
zmq
::
select_t
::
get_fd_family
(
fd_t
fd_
)
{
...
...
@@ -579,11 +584,6 @@ u_short zmq::select_t::determine_fd_family (fd_t fd_)
return
AF_UNSPEC
;
}
zmq
::
select_t
::
family_entry_t
::
family_entry_t
()
:
has_retired
(
false
)
{
}
zmq
::
select_t
::
wsa_events_t
::
wsa_events_t
()
{
events
[
0
]
=
WSACreateEvent
();
...
...
src/select.hpp
View file @
08201bc1
...
...
@@ -115,11 +115,7 @@ class select_t : public poller_base_t
struct
family_entry_t
{
#ifndef ZMQ_HAVE_WINDOWS
family_entry_t
()
{};
#else
family_entry_t
();
#endif
fd_entries_t
fd_entries
;
fds_set_t
fds_set
;
...
...
@@ -161,7 +157,6 @@ class select_t : public poller_base_t
// on non-Windows, we can treat all fds as one family
family_entry_t
family_entry
;
fd_t
maxfd
;
bool
retired
;
#endif
// Checks if an fd_entry_t is retired.
...
...
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