Useful NSOperation
(Operation
) and NSOperationQueue
(OperationQueue
) subclasses for Swift.
Scalable, thread-safe, and automatically fully progress-reporting for nested child operations.
- Foundational
BasicOperation
andBasicAsyncOperation
- Closure-based
ClosureOperation
andAsyncClosureOperation
InteractiveClosureOperation
andInteractiveAsyncClosureOperation
- Thread-safe atomic mutability
AtomicBlockOperation
- Add the package to your Xcode project using Swift Package Manager
- Select File → Swift Packages → Add Package Dependency
- Add package using
https://github.com/orchetect/OTOperations
as the URL.
- Import the module in your *.swift files where needed.
import OTOperations
-
In your Package.swift file:
dependencies: [ .package(url: "https://github.com/orchetect/OTOperations", from: "2.0.0") ],
-
Using
internal import
prevents the methods and properties inOTOperations
from being exported to the consumer of your SPM package.internal import OTOperations
Most methods are implemented as category methods so they are generally discoverable.
All methods have inline help explaining their purpose and basic usage examples.
Coded by a bunch of 🐹 hamsters in a trenchcoat that calls itself @orchetect.
Licensed under the MIT license. See LICENSE for details.
Please do not email maintainers for technical support. Several options are available for issues and questions:
- Questions and feature ideas can be posted to Discussions.
- If an issue is a verifiable bug with reproducible steps it may be posted in Issues.
Contributions are welcome. Posting in Discussions first prior to new submitting PRs for features or modifications is encouraged.