Overview
Comment: | OFRunLoop: Use OFMutex instead of @synchronized. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
35ad639b7c52b215aa01bf4489120e6a |
User & Date: | js on 2012-12-16 13:39:11 |
Other Links: | manifest | tags |
Context
2012-12-16
| ||
14:57 | Add -[stringByAppendingFormat:arguments:]. check-in: aecadefe62 user: js tags: trunk | |
13:39 | OFRunLoop: Use OFMutex instead of @synchronized. check-in: 35ad639b7c user: js tags: trunk | |
01:24 | OFStream: Fix a FIXME. check-in: 28ffd3d914 user: js tags: trunk | |
Changes
Modified src/OFRunLoop.h from [3854375363] to [eb85eb1d39].
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 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 | + + | #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. * |
︙ |
Modified src/OFRunLoop.m from [a5c17b66d7] to [5845195cdf].
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + | #include "config.h" #import "OFRunLoop.h" #import "OFDictionary.h" #import "OFThread.h" #import "OFSortedList.h" #import "OFMutex.h" #import "OFTimer.h" #import "OFDate.h" #import "autorelease.h" #import "macros.h" static OFRunLoop *mainRunLoop = nil; |
︙ | |||
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | + + - + + + + + | - init { self = [super init]; @try { timersQueue = [[OFSortedList alloc] init]; timersQueueLock = [[OFMutex alloc] init]; streamObserver = [[OFStreamObserver alloc] init]; [streamObserver setDelegate: self]; readQueues = [[OFMutableDictionary alloc] init]; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [timersQueue release]; [timersQueueLock release]; [streamObserver release]; [readQueues release]; [super dealloc]; } - (void)addTimer: (OFTimer*)timer { |
︙ | |||
526 527 528 529 530 531 532 | 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | - + + + + - + + + + | { for (;;) { void *pool = objc_autoreleasePoolPush(); OFDate *now = [OFDate date]; OFTimer *timer; OFDate *nextTimer; |
︙ |