Differences From Artifact [2c9b5a07cf]:
- File
src/OFStreamObserver.m
— part of check-in
[47caef4f8a]
at
2011-09-20 18:40:54
on branch trunk
— OFStreamObserver improvements.
* Make it possible to close a stream before the add/remove queue has
been processed.
* The actual implementations don't need to handle OFStreams now, but
get the file descriptor instead.
* Use an OFMutex instead of @synchronized. (user: js, size: 8571) [annotate] [blame] [check-ins using]
To Artifact [c099293000]:
- File src/OFStreamObserver.m — part of check-in [4f6270da38] at 2011-09-22 01:11:45 on branch trunk — Add support for kqueue. (user: js, size: 8778) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #import "OFDataArray.h" #ifdef _WIN32 # import "OFTCPSocket.h" #endif #import "OFThread.h" #import "OFAutoreleasePool.h" #ifdef HAVE_POLL_H # import "OFStreamObserver_poll.h" #endif #if defined(HAVE_SYS_SELECT_H) || defined(_WIN32) # import "OFStreamObserver_select.h" #endif | > > > | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #import "OFDataArray.h" #ifdef _WIN32 # import "OFTCPSocket.h" #endif #import "OFThread.h" #import "OFAutoreleasePool.h" #ifdef HAVE_KQUEUE # import "OFStreamObserver_kqueue.h" #endif #ifdef HAVE_POLL_H # import "OFStreamObserver_poll.h" #endif #if defined(HAVE_SYS_SELECT_H) || defined(_WIN32) # import "OFStreamObserver_select.h" #endif |
︙ | ︙ | |||
56 57 58 59 60 61 62 | @implementation OFStreamObserver + observer { return [[[self alloc] init] autorelease]; } | | > > > > > > > > | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | @implementation OFStreamObserver + observer { return [[[self alloc] init] autorelease]; } #if defined(HAVE_KQUEUE) + alloc { if (self == [OFStreamObserver class]) return [OFStreamObserver_kqueue alloc]; return [super alloc]; } #elif defined(HAVE_POLL_H) + alloc { if (self == [OFStreamObserver class]) return [OFStreamObserver_poll alloc]; return [super alloc]; } |
︙ | ︙ |