GNThreadPool 0.4.0

GNThreadPool 0.4.0

TestsTested
LangLanguage Objective C++Objective C++
License MIT
ReleasedLast Release Oct 2016

Maintained by Games Neox.



 
Depends on:
GNExceptions>= 0
GNLog>= 0
GNPreconditions>= 0
 

  • By
  • Games Neox

Simple thread pool for Objective-C/Swift. Basis usage:

#import <GNThreadPool/GNThreadPool.h>

GNThreadPool* threadPool = [[GNThreadPool alloc] initWithThreadsAmount:4 withPriority: GNThreadPriorityHigher];

[threadPool enqueue:^{
    NSLog(@"in a separate thread");
}];

[threadPool clear];
import GNThreadPool

let threadPool = GNThreadPool(threadsAmount: 4,  withPriority: .Higher)

threadPool.enqueue() {
    NSLog("in a separate thread")
}

threadPool.clear()

Inspiried by Jakob Progsch, Václav Zeman, 2012

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Minimum supported iOS version: 8.x
Dependencies: GNExceptions, GNLog & GNPreconditions

Installation

GNThreadPool is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "GNThreadPool"

Author

Games Neox, [email protected]

License

GNThreadPool is available under the MIT license. See the LICENSE file for more info.