Differences From Artifact [e60316af1b]:
- File
src/OFKernelEventObserver_LockedQueue.h
— part of check-in
[e9b4700cb6]
at
2015-12-29 21:33:07
on branch trunk
— Refactor OFKernelEventObserver
This moves the locked queue for actions to
OFKernelEventObserver_LockedQueue, which is now used for select and
poll, but skipped for kqueue and epoll, as they natively support changes
from another thread.This fixes the problem that removing an object is delayed until the next
observe call - at which point it might have already been closed, meaning
the fd is no longer available. This was mainly a problem with kqueue, as
closing the fd already removed it from the kqueue, which then resulted
in an error being returned when trying to manually remove the fd from
the kqueue. (user: js, size: 1283) [annotate] [blame] [check-ins using] [more...]
To Artifact [e5e6d24907]:
- File
src/OFKernelEventObserver_LockedQueue.h
— part of check-in
[258b8a4944]
at
2016-01-03 00:35:01
on branch trunk
— Fix a regression from the previous refactorization
kqueue and epoll were not updating _readObjects and _writeObjects
anymore, since this was done by the queue handling code, which they no
longer use after the refactorization. (user: js, size: 1189) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
16 17 18 19 20 21 22 | #import "OFKernelEventObserver.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableArray OF_GENERIC(ObjectType); @class OFDataArray; | < < < < < < | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #import "OFKernelEventObserver.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableArray OF_GENERIC(ObjectType); @class OFDataArray; @interface OFKernelEventObserver_LockedQueue: OFKernelEventObserver { OFDataArray *_queueActions, *_queueFDs; OFMutableArray *_queueObjects; } - (void)OF_addObjectForReading: (id)object fileDescriptor: (int)fd; - (void)OF_addObjectForWriting: (id)object fileDescriptor: (int)fd; - (void)OF_removeObjectForReading: (id)object |
︙ | ︙ |