Latest 0.0.1
Homepage https://github.com/vlfm/Executor
License MIT
Platforms ios 10.0, osx 10.12
Authors

Executor is an abstraction for tasks execution decoupled from concrete types like DispatchQueue or OperationQueue.

Executor has only limited api for tasks execution compared with Dispatch framework, for example. But often it is all that is needed. And it is also could be useful to have dependency on a protocol, not on concrete type of queue.

let executor: Executor
//

executor.execute {
  //
}

executor.execute(wait: true) {
  //
}

executor.sync {
  //
}

executor.async {
  //
}

DirectExecutor

Executes tasks on current thread synchronously. Can be useful in unit tests.

DispatchQueueExecutor

Executes tasks on DispatchQueue.

OperationQueueExecutor

Executes tasks on OperationQueue.

Executors

Helper factory for creating executor instances.
For example, it has method to create executor on main thread.

let executor = Executors.main()

Latest podspec

{
    "name": "Executor",
    "version": "0.0.1",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "summary": "Executor is an abstraction for tasks execution decoupled from concrete types like DispatchQueue or OperationQueue.",
    "homepage": "https://github.com/vlfm/Executor",
    "authors": {
        "Valery Fomenko": "[email protected]"
    },
    "source": {
        "git": "https://github.com/vlfm/Executor.git",
        "tag": "0.0.1"
    },
    "platforms": {
        "ios": "10.0",
        "osx": "10.12"
    },
    "source_files": "Source/**/*.swift",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This