OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 smsg.thread->socketserver()->WakeUp(); | 475 smsg.thread->socketserver()->WakeUp(); |
476 continue; | 476 continue; |
477 } | 477 } |
478 ++iter; | 478 ++iter; |
479 } | 479 } |
480 | 480 |
481 MessageQueue::Clear(phandler, id, removed); | 481 MessageQueue::Clear(phandler, id, removed); |
482 } | 482 } |
483 | 483 |
484 bool Thread::ProcessMessages(int cmsLoop) { | 484 bool Thread::ProcessMessages(int cmsLoop) { |
485 uint32_t msEnd = (kForever == cmsLoop) ? 0 : TimeAfter(cmsLoop); | 485 int64_t msEnd = (kForever == cmsLoop) ? 0 : TimeAfter(cmsLoop); |
486 int cmsNext = cmsLoop; | 486 int cmsNext = cmsLoop; |
487 | 487 |
488 while (true) { | 488 while (true) { |
489 #if __has_feature(objc_arc) | 489 #if __has_feature(objc_arc) |
490 @autoreleasepool | 490 @autoreleasepool |
491 #elif defined(WEBRTC_MAC) | 491 #elif defined(WEBRTC_MAC) |
492 // see: http://developer.apple.com/library/mac/#documentation/Cocoa/Referenc
e/Foundation/Classes/NSAutoreleasePool_Class/Reference/Reference.html | 492 // see: http://developer.apple.com/library/mac/#documentation/Cocoa/Referenc
e/Foundation/Classes/NSAutoreleasePool_Class/Reference/Reference.html |
493 // Each thread is supposed to have an autorelease pool. Also for event loops | 493 // Each thread is supposed to have an autorelease pool. Also for event loops |
494 // like this, autorelease pool needs to be created and drained/released | 494 // like this, autorelease pool needs to be created and drained/released |
495 // for each cycle. | 495 // for each cycle. |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 if (SUCCEEDED(hr)) { | 556 if (SUCCEEDED(hr)) { |
557 Thread::Run(); | 557 Thread::Run(); |
558 CoUninitialize(); | 558 CoUninitialize(); |
559 } else { | 559 } else { |
560 LOG(LS_ERROR) << "CoInitialize failed, hr=" << hr; | 560 LOG(LS_ERROR) << "CoInitialize failed, hr=" << hr; |
561 } | 561 } |
562 } | 562 } |
563 #endif | 563 #endif |
564 | 564 |
565 } // namespace rtc | 565 } // namespace rtc |
OLD | NEW |