https://github.com/horothesun/asynctaskswitcher
Swift asynchronous task switcher: it calls the completion handler of the most-recently-completed asynchronous task.
https://github.com/horothesun/asynctaskswitcher
async-tasks asynchronous-tasks github-actions swift swift-package swift-package-manager swiftpm task-switching thread-safe thread-safety threadsafe
Last synced: 2 months ago
JSON representation
Swift asynchronous task switcher: it calls the completion handler of the most-recently-completed asynchronous task.
- Host: GitHub
- URL: https://github.com/horothesun/asynctaskswitcher
- Owner: horothesun
- License: mit
- Created: 2020-05-07T19:02:20.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-20T00:53:00.000Z (over 4 years ago)
- Last Synced: 2025-01-04T15:30:44.739Z (4 months ago)
- Topics: async-tasks, asynchronous-tasks, github-actions, swift, swift-package, swift-package-manager, swiftpm, task-switching, thread-safe, thread-safety, threadsafe
- Language: Swift
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AsyncTaskSwitcher
[](https://github.com/horothesun/AsyncTaskSwitcher/blob/master/.github/workflows/ci-linux.yml)
[](https://github.com/horothesun/AsyncTaskSwitcher/blob/master/.github/workflows/ci-macos.yml)
[](https://codecov.io/gh/horothesun/AsyncTaskSwitcher)
[](https://swift.org/package-manager/)Swift asynchronous task switcher: it calls the completion handler of the most-recently-completed asynchronous task.
## Generate Xcode project
```bash
swift package generate-xcodeproj
```## Testing
### macOS
```bash
swift test
```### Docker Linux
IMPORTANT: regenerate Linux test list executing
```bash
swift test --generate-linuxmain
```Execute on base `swift:5.2` image
```bash
docker run --rm \
--volume "$(pwd):/package" \
--workdir '/package' \
swift:5.2 \
/bin/bash -c 'swift test'
```or create a new image based on `Dockerfile` and run it
```bash
docker build --tag async-task-switcher .
docker run --rm async-task-switcher
```