diff options
Diffstat (limited to 'Swiften/EventLoop/Cocoa/CocoaEventLoop.mm')
-rw-r--r-- | Swiften/EventLoop/Cocoa/CocoaEventLoop.mm | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm b/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm index 2d7c613..de7c1de 100644 --- a/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm +++ b/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm @@ -19,25 +19,25 @@ CocoaEventLoop::~CocoaEventLoop() { } void CocoaEventLoop::handleNextCocoaEvent() { - { - boost::recursive_mutex::scoped_lock lock(isEventInCocoaEventLoopMutex_); - isEventInCocoaEventLoop_ = false; - } - handleNextEvents(); + { + boost::recursive_mutex::scoped_lock lock(isEventInCocoaEventLoopMutex_); + isEventInCocoaEventLoop_ = false; + } + handleNextEvents(); } void CocoaEventLoop::eventPosted() { - boost::recursive_mutex::scoped_lock lock(isEventInCocoaEventLoopMutex_); - if (!isEventInCocoaEventLoop_) { - isEventInCocoaEventLoop_ = true; - - CocoaEvent* cocoaEvent = [[CocoaEvent alloc] init: this]; - [cocoaEvent - performSelectorOnMainThread:@selector(process) - withObject: nil - waitUntilDone: NO]; - [cocoaEvent release]; - } + boost::recursive_mutex::scoped_lock lock(isEventInCocoaEventLoopMutex_); + if (!isEventInCocoaEventLoop_) { + isEventInCocoaEventLoop_ = true; + + CocoaEvent* cocoaEvent = [[CocoaEvent alloc] init: this]; + [cocoaEvent + performSelectorOnMainThread:@selector(process) + withObject: nil + waitUntilDone: NO]; + [cocoaEvent release]; + } } } |