Differences From Artifact [dd8f6e2345]:
- File
src/OFKernelEventObserver.h
— part of check-in
[80e1a9655b]
at
2015-06-17 22:11:31
on branch trunk
— Add OF_NULLABLE_PROPERTY
This is necessary to make GCC (>= 4.6 and Apple GCC) happy as they don't
like the list of property attributes ending in a comma. (user: js, size: 7049) [annotate] [blame] [check-ins using]
To Artifact [b0b3935794]:
- File
src/OFKernelEventObserver.h
— part of check-in
[c5f0c5f9ba]
at
2015-12-29 21:42:38
on branch 0.8
— 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: 6821) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
17 18 19 20 21 22 23 | #import "OFObject.h" #import "socket.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableArray OF_GENERIC(ObjectType); | < < < < < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #import "OFObject.h" #import "socket.h" OF_ASSUME_NONNULL_BEGIN @class OFMutableArray OF_GENERIC(ObjectType); @class OFDate; /*! * @protocol OFKernelEventObserverDelegate * OFKernelEventObserver.h ObjFW/OFKernelEventObserver.h * * @brief A protocol that needs to be implemented by delegates for |
︙ | ︙ | |||
110 111 112 113 114 115 116 | */ @interface OFKernelEventObserver: OFObject { OFMutableArray OF_GENERIC(id <OFReadyForReadingObserving>) *_readObjects; OFMutableArray OF_GENERIC(id <OFReadyForWritingObserving>) *_writeObjects; | < < < < < | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | */ @interface OFKernelEventObserver: OFObject { OFMutableArray OF_GENERIC(id <OFReadyForReadingObserving>) *_readObjects; OFMutableArray OF_GENERIC(id <OFReadyForWritingObserving>) *_writeObjects; id <OFKernelEventObserverDelegate> _delegate; #ifdef OF_HAVE_PIPE int _cancelFD[2]; #else of_socket_t _cancelFD[2]; struct sockaddr_in _cancelAddr; #endif } #ifdef OF_HAVE_PROPERTIES @property OF_NULLABLE_PROPERTY (assign) id <OFKernelEventObserverDelegate> delegate; #endif |
︙ | ︙ |