Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A lightweight Swift library & syntactic sugar for async (GCD) operations

License

NotificationsYou must be signed in to change notification settings

biering/coex

Repository files navigation


Coex comes from Coexistence and is a lightweight Swift library & syntactic sugar for async (GCD) operations.
Made with ♥ in pure Swift 5.x, no dependencies, simple & fully portable.

Usage

You can also useCoex.async(...) instead ofasync(...).

DispatchQueue Types

  • main
  • background
  • utility
  • userInitiated
  • userInteractive
  • custom

DispatchQueue Syntactic Sugar

Running a block of code in a specific DispatchQueue.Default is.main.

BECOMES
DispatchQueue.<queue>.async { }async(.<queue>) { }
DispatchQueue.main.async { }async(.main) { }
async { } (.main is default)
DispatchQueue.global(qos: .background).async { }async(.main, after: 3.0) { }

Async After

Executing a block of code after a specific time (in seconds).Default isnil.

BECOMES
DispatchQueue.<queue>.asyncAfter(deadline: .now() + 3.0) { }async(.<queue>, after: 3.0) { }
DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) { }async(.main, after: 3.0) { }

Install

Swift Package Manager

Add the following as a dependency to yourPackage.swift:

.package(url: "https://github.com/chryb/coex.git", .exact("1.0.0"))

Carthage

Insert the following into yourCartfile:

github "chryb/coex" == 1.0.0

Cocoapods

Add the following to yourPodspec:

use_frameworks!pod "Coex"

License

Just MIT. SeeLICENSE.

About

A lightweight Swift library & syntactic sugar for async (GCD) operations

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp