@@ -18,21 +18,25 @@ #import "OFStream.h" #import "OFStreamObserver.h" #import "OFTCPSocket.h" @class OFSortedList; +#ifdef OF_THREADS @class OFMutex; +#endif @class OFTimer; @class OFMutableDictionary; /*! * @brief A class providing a run loop for the application and its processes. */ @interface OFRunLoop: OFObject { OFSortedList *timersQueue; +#ifdef OF_THREADS OFMutex *timersQueueLock; +#endif OFStreamObserver *streamObserver; OFMutableDictionary *readQueues; } /*! @@ -47,11 +51,11 @@ * * @return The run loop for the current thread */ + (OFRunLoop*)currentRunLoop; -+ (void)OF_setMainRunLoop; ++ (void)OF_setMainRunLoop: (OFRunLoop*)runLoop; + (void)OF_addAsyncReadForStream: (OFStream*)stream buffer: (void*)buffer length: (size_t)length target: (id)target selector: (SEL)selector;