@@ -25,10 +25,13 @@ #import "OFStream+Private.h" #ifndef OF_HAVE_PIPE # import "OFStreamSocket.h" #endif #import "OFDate.h" +#ifdef OF_HAVE_THREADS +# import "OFMutex.h" +#endif #ifdef HAVE_KQUEUE # import "OFKernelEventObserver_kqueue.h" #endif #ifdef HAVE_EPOLL @@ -131,10 +134,14 @@ &cancelAddrLen) != 0) @throw [OFInitializationFailedException exceptionWithClass: [self class]]; # endif #endif + +#ifdef OF_HAVE_THREADS + _mutex = [[OFMutex alloc] init]; +#endif } @catch (id e) { [self release]; @throw e; } @@ -147,10 +154,14 @@ if (_cancelFD[1] != _cancelFD[0]) close(_cancelFD[1]); [_readObjects release]; [_writeObjects release]; + +#ifdef OF_HAVE_THREADS + [_mutex release]; +#endif [super dealloc]; } - (id )delegate