GroupWork alternatives and similar libraries
Based on the "Concurrency" category.
Alternatively, view GroupWork alternatives based on common mentions on social networks and blogs.
-
Hydra
⚡️ Lightweight full-featured Promises, Async & Await Library in Swift -
Venice
Coroutines, structured concurrency and CSP for Swift on macOS and Linux. -
Overdrive
Fast async task based API in Swift with focus on type safety, concurrency and multi threading. -
Kommander
A lightweight, pure-Swift library for manage the task execution in different threads. Through the definition a simple but powerful concept, Kommand. -
AsyncNinja
A complete set of primitives for concurrency and reactive programming on Swift -
Throttler
Throttler is a library helping you debounce and throttle without having to go to reactive (RxSwift, Combine) -
Futura
Asynchronous Swift made easy. The project was made by Miquido. https://www.miquido.com/ -
Solver7CSP
CSP like thread management with Swift. I became interested in Swift when I saw that it is becoming compatible with TensorFlow. I reworked an old Java project of mine from 1998 in order to learn how to do some things in Swift.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of GroupWork or a related project?
README
GroupWork is an easy to use Swift framework that helps you orchestrate your concurrent, asynchronous functions in a clean and organized way. This helps make large functions with multiple asynchronous tasks more clear and easy to follow.
Contents
Requirements
Installation
CocoaPods
For CocoaPods, add to Podfile
:
pod 'GroupWork', '~> 0.0'
Carthage
For Carthage, add to Cartfile
:
github "quanvo87/GroupWork"
Swift Package Manager
For SPM, add to your package dependencies:
.package(url: "https://github.com/quanvo87/GroupWork.git", .upToNextMinor(from: "0.0.0"))
Manually
- for projects, drag
GroupWork.swift
to the project tree - for workspaces, include the whole
GroupWork.xcodeproj
Documentation
Example Usage
End Goal
import GroupWork
...
func complexFunc(completion: @escaping (Bool) -> Void) {
let work = GroupWork()
work.asyncFuncA()
work.asyncFuncB()
work.asyncFuncC()
work.allDone() {
completion(work.result)
}
}
...
complexFunc
is a function that returns the result of three asynchronous functions asyncFuncA()
, asyncFuncB()
, and asyncFuncC()
, running concurrently. The completion handler is called only when all these functions have completed. Usage of this library has enabled the above clean interface. This can be scaled to much higher than three asynchronous functions.
notes:
- the asynchronous functions should be able to run concurrently without affecting each other
work.result
is only a simpleBool
- this is not an answer to callback hell
Set Up
There is some set up required in order to create complexFunc()
from above:
import GroupWork
extension GroupWork {
func asyncFuncA() {
start()
networkCallA() { (result) in
self.finish(withResult: result)
}
}
func asyncFuncB() {
start()
networkCallB() { (result) in
self.finish(withResult: result)
}
}
func asyncFuncC() {
start()
networkCallC() { (result) in
self.finish(withResult: result)
}
}
}
Now you can create a GroupWork
, and call work.simpleFuncA()
on it like in the example.
notes:
start()
must be called before an asynchronous taskfinish()
must be called in the completion handler of an asynchronous taskstart()
andfinish()
calls must be balanced
Working Example
The [tests](Tests/GroupWorkTests/GroupWorkTests.swift) have a working example.
License
MIT [LICENSE](LICENSE)
Authors
- Quan Vo
- Wilson Ding
- Banner: Michelle Law
Please provide attribution, it is greatly appreciated.
*Note that all licence references and agreements mentioned in the GroupWork README section above
are relevant to that project's source code only.