mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 14:35:29 +00:00
[2617] added comments about restrictions on run_kqueue/poller.
This commit is contained in:
@@ -632,6 +632,12 @@ class MsgQ:
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
writable = event & select.POLLOUT
|
writable = event & select.POLLOUT
|
||||||
|
# Note: it may be okayb to read data if available
|
||||||
|
# immediately after write some, but due to unexpected
|
||||||
|
# regression (see comments on the kqueue version below)
|
||||||
|
# we restrict one operation per iteration for now.
|
||||||
|
# In future we may clarify the point and enable the
|
||||||
|
# "read/write" mode.
|
||||||
readable = not writable and (event & select.POLLIN)
|
readable = not writable and (event & select.POLLIN)
|
||||||
if not writable and not readable:
|
if not writable and not readable:
|
||||||
logger.error(MSGQ_POLL_UNKNOWN_EVENT, fd, event)
|
logger.error(MSGQ_POLL_UNKNOWN_EVENT, fd, event)
|
||||||
@@ -658,6 +664,10 @@ class MsgQ:
|
|||||||
writable = event.filter == select.KQ_FILTER_WRITE
|
writable = event.filter == select.KQ_FILTER_WRITE
|
||||||
readable = (event.filter == select.KQ_FILTER_READ and
|
readable = (event.filter == select.KQ_FILTER_READ and
|
||||||
event.data > 0)
|
event.data > 0)
|
||||||
|
# It seems to break some of our test cases if we
|
||||||
|
# immediately close the socket on EOF after reading
|
||||||
|
# some data. It may be possible to avoid by tweaking
|
||||||
|
# the test, but unless we can be sure we'll hold off.
|
||||||
closed = (not readable and
|
closed = (not readable and
|
||||||
(event.flags & select.KQ_EV_EOF))
|
(event.flags & select.KQ_EV_EOF))
|
||||||
self._process_fd(fd, writable, readable, closed)
|
self._process_fd(fd, writable, readable, closed)
|
||||||
|
Reference in New Issue
Block a user