You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Queuer is a queue manager, built on top of [OperationQueue](https://developer.apple.com/documentation/foundation/operationqueue) and [Dispatch](https://developer.apple.com/documentation/dispatch) (aka GCD). It allows you to create any asynchronous and synchronous task easily, all managed by a queue, with just a few lines.
7
+
Queuer is a queue manager built on top of [OperationQueue](https://developer.apple.com/documentation/foundation/operationqueue) and [Dispatch](https://developer.apple.com/documentation/dispatch) (aka GCD). It allows you to create asynchronous and synchronous tasks easily, all managed by a queue, with just a few lines.
10
8
11
-
Here is the list of all the features:
9
+
## Features
12
10
13
-
-[x] Works on all Swift compatible platforms (even Linux)
11
+
-[x] Works on all Swift compatible platforms (Linux included)
14
12
-[x] Easy to use
15
13
-[x] Well documented (100% documented)
16
14
-[x] Well tested (100% of code coverage)
17
15
-[x] Create an operation block
18
16
-[x] Create a single operation
19
17
-[x] Create chained operations
20
18
-[x] Manage a centralized queue
21
-
-[x] Create unlimited queue
22
-
-[x] Declare how many concurrent operation a queue can handle
19
+
-[x] Create unlimited queues
20
+
-[x] Declare how many concurrent operations a queue can handle
23
21
-[x] Create semaphores
24
22
-[x] Create and handle schedules
25
23
-[x] Automatically or manually retry an operation
@@ -34,7 +32,7 @@ Here is the list of all the features:
@@ -217,23 +215,14 @@ There are a few method to handle the queue states.
217
215
218
216
Setting the `maxConcurrentOperationCount` property of a queue to `1` will make you sure that only one task at a time will be executed.
219
217
220
-
### Asynchronous Operation
218
+
### Create a Custom Operation
221
219
222
-
`ConcurrentOperation` is a classcreated to be subclassed.
220
+
If you want to create your custom `Operation`, the class`ConcurrentOperation` is a class ready to be subclassed.
223
221
It allows synchronous and asynchronous tasks, has a pause and resume states, can be easily added to a queue and can be created with a block.
224
222
225
223
You can create your custom `ConcurrentOperation` by subclassing it.
226
224
227
-
You must override `execute()` function and call the `finish(success:)`function inside it, when the task has finished its job to notify the queue.
228
-
229
-
For convenience it has an `init` function with a completion block:
230
-
231
-
```swift
232
-
let concurrentOperation = ConcurrentOperation { _in
233
-
/// Your task here
234
-
}
235
-
concurrentOperation.addToQueue(queue)
236
-
```
225
+
You must override `execute()` function and call the `finish(success:)`function, when the task has finished its job to notify the queue, regardless if it was successful or not.
0 commit comments