Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/briancoyner/AsyncWorkflow
Techniques for building "async workflows" using `NSOperation` and `NSOperationQueue`.
https://github.com/briancoyner/AsyncWorkflow
async cocoaheads grand-central-dispatch nsoperation nsoperationqueue nsprogess swift xcode10
Last synced: 3 months ago
JSON representation
Techniques for building "async workflows" using `NSOperation` and `NSOperationQueue`.
- Host: GitHub
- URL: https://github.com/briancoyner/AsyncWorkflow
- Owner: briancoyner
- License: mit
- Created: 2018-08-09T03:08:41.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-19T21:55:49.000Z (over 5 years ago)
- Last Synced: 2024-07-11T13:00:23.099Z (4 months ago)
- Topics: async, cocoaheads, grand-central-dispatch, nsoperation, nsoperationqueue, nsprogess, swift, xcode10
- Language: Swift
- Homepage:
- Size: 9.14 MB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Async Workflow
All apps have asynchronous workflows. Apple's `NSOperation` and `NSOperationQueue` provide a foundation for building arbitrarily complex workflows. This demo code coincides with my [STL CocoaHeads](https://www.meetup.com/St-Louis-CocoaHeads/events/253392866/) talk on techniques for building "async workflows".
The demo code shows how to:
- use dependent operations
- pass data between operations using a thread-safe key/value store (i.e `Session`)
- track progress using `NSProgress`
- support an easy to understand cancellation policy
- allow app background execution (with just a few lines of code)## Presentation Slides
Be sure to review the CocoaHeads [presentation slides](AsyncWorkflow.pdf) for additional notes and details.
## Additional Resources
Here's a short list of related WWDC videos
- WWDC 2015 [Advanced NSOperations](https://developer.apple.com/videos/play/wwdc2015/226/)
- WWDC 2015 [Best Practices In Progress Reporting](https://developer.apple.com/videos/play/wwdc2015/232/)
- WWDC 2017 [Modernizing Grand Central Dispatch Usage](https://developer.apple.com/videos/play/wwdc2017/706/)