Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Unified Diff: webrtc/base/maccocoathreadhelper.mm

Issue 2784483002: Add Darwin thread.h implementation. (Closed)
Patch Set: Make ThreadInit private to rtc::Thread Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/maccocoathreadhelper.h ('k') | webrtc/base/scoped_autorelease_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/maccocoathreadhelper.mm
diff --git a/webrtc/base/maccocoathreadhelper.mm b/webrtc/base/maccocoathreadhelper.mm
deleted file mode 100644
index 70d920de3980c599beaeead2d061f7f170eff3c8..0000000000000000000000000000000000000000
--- a/webrtc/base/maccocoathreadhelper.mm
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2007 The WebRTC Project Authors. All rights reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-// Helper function for using Cocoa with Posix threading.
-
-#import <Foundation/Foundation.h>
-
-#import "webrtc/base/maccocoathreadhelper.h"
-
-#include "webrtc/base/checks.h"
-
-namespace rtc {
-
-// Cocoa must be "put into multithreading mode" before Cocoa functionality can
-// be used on POSIX threads. The way to do that is to spawn one thread that may
-// immediately exit.
-void InitCocoaMultiThreading() {
- if ([NSThread isMultiThreaded] == NO) {
- // The sole purpose of this autorelease pool is to avoid a console
- // message on Leopard that tells us we're autoreleasing the thread
- // with no autorelease pool in place.
- // Doing NSAutoreleasePool* hack = [[NSAutoreleasePool alloc] init];
- // causes unused variable error.
- NSAutoreleasePool* hack;
- hack = [[NSAutoreleasePool alloc] init];
- [NSThread detachNewThreadSelector:@selector(class)
- toTarget:[NSObject class]
- withObject:nil];
- [hack drain];
- }
-
- RTC_DCHECK([NSThread isMultiThreaded]);
-}
-
-} // namespace rtc
« no previous file with comments | « webrtc/base/maccocoathreadhelper.h ('k') | webrtc/base/scoped_autorelease_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698