https://github.com/orchetect/otatomics
Multi-platform Swift thread-safe atomics library
https://github.com/orchetect/otatomics
atomic atomics ios ios-swift macos swift swift-5 swift-5-5 tvos watchos
Last synced: 3 months ago
JSON representation
Multi-platform Swift thread-safe atomics library
- Host: GitHub
- URL: https://github.com/orchetect/otatomics
- Owner: orchetect
- License: mit
- Created: 2022-02-14T20:58:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-27T22:35:05.000Z (6 months ago)
- Last Synced: 2025-03-29T23:32:13.189Z (4 months ago)
- Topics: atomic, atomics, ios, ios-swift, macos, swift, swift-5, swift-5-5, tvos, watchos
- Language: Swift
- Homepage:
- Size: 43.9 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# OTAtomics
[](https://github.com/orchetect/OTAtomics/actions/workflows/build.yml) [](https://developer.apple.com/swift)  [](https://developer.apple.com/swift) [](https://github.com/orchetect/OTAtomics/blob/main/LICENSE)
Multi-platform Swift thread-safe atomics library.
The library has full unit test coverage and is actively used in production.
## Installation: Swift Package Manager (SPM)
### Dependency within an Application
1. 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/OTAtomics` as the URL.
2. Import the module in your *.swift files where needed.
```swift
import OTAtomics
```### Dependency within a Swift Package
1. In your Package.swift file:
```swift
dependencies: [
.package(url: "https://github.com/orchetect/OTAtomics", from: "1.0.0")
],
```
2. Using `internal import` prevents the methods and properties in `OTOperations` from being exported to the consumer of your SPM package.```swift
internal import OTAtomics
```## Documentation
Most methods are implemented as category methods so they are generally discoverable.
All methods have inline help explaining their purpose and basic usage examples.
## Author
Coded by a bunch of 🐹 hamsters in a trenchcoat that calls itself [@orchetect](https://github.com/orchetect).
## License
Licensed under the MIT license. See [LICENSE](https://github.com/orchetect/OTAtomics/blob/master/LICENSE) for details.
## Contributions
Bug fixes and improvements are welcome. Please open an issue to discuss prior to submitting PRs.