ObjFW  Diff

Differences From Artifact [2abdc87418]:

To Artifact [f2e88dae39]:


16
17
18
19
20
21
22

23

24
25
26
27
28
29
30
31
32

33

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

#import "OFObject.h"
#import "OFStream.h"
#import "OFStreamObserver.h"
#import "OFTCPSocket.h"

@class OFSortedList;

@class OFMutex;

@class OFTimer;
@class OFMutableDictionary;

/*!
 * @brief A class providing a run loop for the application and its processes.
 */
@interface OFRunLoop: OFObject
{
	OFSortedList *timersQueue;

	OFMutex *timersQueueLock;

	OFStreamObserver *streamObserver;
	OFMutableDictionary *readQueues;
}

/*!
 * @brief Returns the main run loop.
 *
 * @return The main run loop
 */
+ (OFRunLoop*)mainRunLoop;

/*!
 * @brief Returns the run loop for the current thread.
 *
 * @return The run loop for the current thread
 */
+ (OFRunLoop*)currentRunLoop;

+ (void)OF_setMainRunLoop;
+ (void)OF_addAsyncReadForStream: (OFStream*)stream
			  buffer: (void*)buffer
			  length: (size_t)length
			  target: (id)target
			selector: (SEL)selector;
+ (void)OF_addAsyncReadForStream: (OFStream*)stream
			  buffer: (void*)buffer







>

>









>

>


















|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

#import "OFObject.h"
#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;
}

/*!
 * @brief Returns the main run loop.
 *
 * @return The main run loop
 */
+ (OFRunLoop*)mainRunLoop;

/*!
 * @brief Returns the run loop for the current thread.
 *
 * @return The run loop for the current thread
 */
+ (OFRunLoop*)currentRunLoop;

+ (void)OF_setMainRunLoop: (OFRunLoop*)runLoop;
+ (void)OF_addAsyncReadForStream: (OFStream*)stream
			  buffer: (void*)buffer
			  length: (size_t)length
			  target: (id)target
			selector: (SEL)selector;
+ (void)OF_addAsyncReadForStream: (OFStream*)stream
			  buffer: (void*)buffer