1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef BASE_WORKER_POOL_MAC_H_
6 #define BASE_WORKER_POOL_MAC_H_
8 #include "base/worker_pool.h"
10 #import <Foundation/Foundation.h>
12 // WorkerPoolObjC provides an Objective-C interface to the same WorkerPool
13 // used by the rest of the application.
14 @interface WorkerPoolObjC
: NSObject
16 // Returns the underlying NSOperationQueue back end that WorkerPool::PostTask
17 // would post tasks to. This can be used to add NSOperation subclasses
18 // directly to the same NSOperationQueue, by calling -[NSOperationQueue
19 // addOperation:]. Most Objective-C code wishing to dispatch tasks to the
20 // WorkerPool will find it handy to add an operation of type
21 // NSInvocationOperation.
22 + (NSOperationQueue
*)sharedOperationQueue
;
24 @end
// @interface WorkerPoolObjC
26 #endif // BASE_WORKER_POOL_MAC_H_