This is an adaptation of the sample code provided in the Advanced NSOperations session of WWDC 2015. The sample code was originally written in Swift 2.0. This framework has been adapted to work for Swift 1.2. For usage examples, see WWDC 2015 Advanced NSOperations and/or look at the included unit tests.
Feel free to fork and submit pull requests, as we are always looking for improvements from the community.
This also provides fixes to issues found in the original sample code, mostly:
- Canceling operations would not work.
- Canceling functions are slightly more friendly.
- Negated Condition would not negate.
- Unit tests!
Note: This project has also been updated for Swift 2.0. Those changes reside in the swift2 branch. They will be merged into master when Swift 2.0 is officially released. The latest updates to the Advanced NSOperations sample code also reside in the swift2 branch.