Differences From Artifact [af64aebbb7]:
- File
src/OFRunLoop.m
— part of check-in
[df53f06922]
at
2012-09-12 06:11:46
on branch trunk
— Run loops have a stream observer now.
This makes async I/O possible! (user: js, size: 2880) [annotate] [blame] [check-ins using]
To Artifact [e04d2c2152]:
- File src/OFRunLoop.m — part of check-in [34e548c51d] at 2012-09-12 06:41:48 on branch trunk — OFRunLoop: Reduce the time the lock is held. (user: js, size: 2855) [annotate] [blame] [check-ins using]
︙ | |||
88 89 90 91 92 93 94 95 96 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | + + + + + + + + + + + + + + + + + + + - - + - - - - + - - - - - - - - - - - - + + + - - - + + - - - - - - - - - - - - - + + + + + + + + + - | } - (void)run { for (;;) { void *pool = objc_autoreleasePoolPush(); OFDate *now = [OFDate date]; OFTimer *timer; OFDate *nextTimer; @synchronized (timersQueue) { of_list_object_t *listObject = [timersQueue firstListObject]; if (listObject != NULL && [[listObject->object fireDate] compare: now] != OF_ORDERED_DESCENDING) { timer = [[listObject->object retain] autorelease]; [timersQueue removeListObject: listObject]; } else timer = nil; } [timer fire]; @synchronized (timersQueue) { |