summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/platform_thread_mac.mm20
1 files changed, 3 insertions, 17 deletions
diff --git a/base/platform_thread_mac.mm b/base/platform_thread_mac.mm
index 34afea7..36e08be 100644
--- a/base/platform_thread_mac.mm
+++ b/base/platform_thread_mac.mm
@@ -9,21 +9,6 @@
#include "base/logging.h"
-// A simple class that demonstrates our impressive ability to do nothing.
-@interface NoOp : NSObject
-
-// Does the deed. Or does it?
-+ (void)noOp;
-
-@end
-
-@implementation NoOp
-
-+ (void)noOp {
-}
-
-@end
-
namespace base {
// If Cocoa is to be used on more than one thread, it must know that the
@@ -37,8 +22,9 @@ namespace base {
void InitThreading() {
static BOOL multithreaded = [NSThread isMultiThreaded];
if (!multithreaded) {
- [NSThread detachNewThreadSelector:@selector(noOp)
- toTarget:[NoOp class]
+ // +[NSObject class] is idempotent.
+ [NSThread detachNewThreadSelector:@selector(class)
+ toTarget:[NSObject class]
withObject:nil];
multithreaded = YES;