Skip to content

Commit 495d2cf

Browse files
Merge pull request #36 from FabrizioBrancati/features/improve-readme
Improve Readme
2 parents 7e5783b + 751c61a commit 495d2cf

File tree

1 file changed

+12
-23
lines changed

1 file changed

+12
-23
lines changed

README.md

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,20 @@
44
[![Swift Versions](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FFabrizioBrancati%2FQueuer%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/FabrizioBrancati/Queuer)
55
[![Swift Platforms](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FFabrizioBrancati%2FQueuer%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/FabrizioBrancati/Queuer)
66

7-
## Features
8-
9-
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.
108

11-
Here is the list of all the features:
9+
## Features
1210

13-
- [x] Works on all Swift compatible platforms (even Linux)
11+
- [x] Works on all Swift compatible platforms (Linux included)
1412
- [x] Easy to use
1513
- [x] Well documented (100% documented)
1614
- [x] Well tested (100% of code coverage)
1715
- [x] Create an operation block
1816
- [x] Create a single operation
1917
- [x] Create chained operations
2018
- [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
2321
- [x] Create semaphores
2422
- [x] Create and handle schedules
2523
- [x] Automatically or manually retry an operation
@@ -34,7 +32,7 @@ Here is the list of all the features:
3432
| 4.1 | 1.3.1...1.3.2 | 8.0+ | 10.10+ | | 9.0+ | 2.0+ | ||
3533
| 4.2 | 2.0.0...2.0.1 | 8.0+ | 10.10+ | | 9.0+ | 3.0+ | ||
3634
| 5.0...5.10 | 2.1.0...2.2.0 | 8.0+ | 10.10+ | | 9.0+ | 3.0+ | ||
37-
| 5.9...5.10 | 3.0.0 | 12.0+ | 10.13+ | 13.0+ | 12.0+ | 4.0+ | 1.0+ ||
35+
| 5.9...5.10 | 3.0.0...3.0.1 | 12.0+ | 10.13+ | 13.0+ | 12.0+ | 4.0+ | 1.0+ ||
3836

3937
## Installing
4038

@@ -63,14 +61,14 @@ Add the dependency to any targets you've declared in your manifest:
6361
- [Custom Queue](https://github.com/FabrizioBrancati/Queuer#custom-queue)
6462
- [Create an Operation Block](https://github.com/FabrizioBrancati/Queuer#create-an-operation-block)
6563
- [Chained Operations](https://github.com/FabrizioBrancati/Queuer#chained-operations)
66-
- [Group Oprations](https://github.com/FabrizioBrancati/Queuer#group-operations)
64+
- [Group Operations](https://github.com/FabrizioBrancati/Queuer#group-operations)
6765
- [Queue States](https://github.com/FabrizioBrancati/Queuer#queue-states)
6866
- [Synchronous Queue](https://github.com/FabrizioBrancati/Queuer#synchronous-queue)
69-
- [Asynchronous Operation](https://github.com/FabrizioBrancati/Queuer#asynchronous-operation)
67+
- [Create a Custom Operation](https://github.com/FabrizioBrancati/Queuer#create-a-custom-operation)
7068
- [Automatically Retry an Operation](https://github.com/FabrizioBrancati/Queuer#automatically-retry-an-operation)
7169
- [Manually Retry an Operation](https://github.com/FabrizioBrancati/Queuer#manually-retry-an-operation)
7270
- [Manually Finish an Operation](https://github.com/FabrizioBrancati/Queuer#manually-finish-an-operation)
73-
- [Async Task in an Operation](https://github.com/FabrizioBrancati/Queuer#async-tasks-in-an-operation)
71+
- [Async Task in an Operation](https://github.com/FabrizioBrancati/Queuer#async-task-in-an-operation)
7472
- [Scheduler](https://github.com/FabrizioBrancati/Queuer#scheduler)
7573
- [Semaphore](https://github.com/FabrizioBrancati/Queuer#semaphore)
7674

@@ -217,23 +215,14 @@ There are a few method to handle the queue states.
217215

218216
Setting the `maxConcurrentOperationCount` property of a queue to `1` will make you sure that only one task at a time will be executed.
219217

220-
### Asynchronous Operation
218+
### Create a Custom Operation
221219

222-
`ConcurrentOperation` is a class created to be subclassed.
220+
If you want to create your custom `Operation`, the class `ConcurrentOperation` is a class ready to be subclassed.
223221
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.
224222

225223
You can create your custom `ConcurrentOperation` by subclassing it.
226224

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.
237226

238227
### Automatically Retry an Operation
239228

0 commit comments

Comments
 (0)