Differences From Artifact [2d8d57de4f]:
- File
src/OFPollKernelEventObserver.m
— part of check-in
[ca45e83bb0]
at
2020-01-06 00:38:24
on branch trunk
— OFPollKernelEventObserver: Handle POLLHUP
The expectation for OFKernelEventObserver is that a disconnected
connection triggers a write event. (user: js, size: 4743) [annotate] [blame] [check-ins using]
To Artifact [899a665da2]:
- File
src/OFPollKernelEventObserver.m
— part of check-in
[24eff635db]
at
2020-01-07 20:28:41
on branch trunk
— OFKernelEventObserver: Remove queueing of actions
This removes the ability to let a thread add or remove objects for
another thread. This features wasn't used at all, but caused significant
problems with kqueue and epoll, as this often resulted in removing a
file descriptor after it had already been closed. (user: js, size: 4629) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
24 25 26 27 28 29 30 | #ifdef HAVE_POLL_H # include <poll.h> #endif #import "OFPollKernelEventObserver.h" #import "OFData.h" | < < | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #ifdef HAVE_POLL_H # include <poll.h> #endif #import "OFPollKernelEventObserver.h" #import "OFData.h" #import "OFObserveFailedException.h" #import "OFOutOfRangeException.h" #import "socket_helpers.h" #ifdef OF_WII |
︙ | ︙ | |||
122 123 124 125 126 127 128 | } break; } } } | | | | | < < | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | } break; } } } - (void)addObjectForReading: (id <OFReadyForReadingObserving>)object { [self of_addObject: object fileDescriptor: object.fileDescriptorForReading events: POLLIN]; } - (void)addObjectForWriting: (id <OFReadyForWritingObserving>)object { [self of_addObject: object fileDescriptor: object.fileDescriptorForWriting events: POLLOUT]; } - (void)removeObjectForReading: (id <OFReadyForReadingObserving>)object { [self of_removeObject: object fileDescriptor: object.fileDescriptorForReading events: POLLIN]; } - (void)removeObjectForWriting: (id <OFReadyForWritingObserving>)object { [self of_removeObject: object fileDescriptor: object.fileDescriptorForWriting events: POLLOUT]; } - (void)observeForTimeInterval: (of_time_interval_t)timeInterval { struct pollfd *FDs; int events; size_t nFDs; if ([self of_processReadBuffers]) return; FDs = _FDs.mutableItems; nFDs = _FDs.count; #ifdef OPEN_MAX |
︙ | ︙ |