Skip to content

[Deprecated] Protocol to swap multitasking system

License

Notifications You must be signed in to change notification settings

swiftstack/async

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Async

An abstraction over coroutine-based io poller and asynchronous task.

This design allows us to easily swap our fiber system to another one provided by the host application.

Package.swift

.package(url: "https://github.com/swiftstack/async.git", .branch("fiber"))

Usage

async.main is just a wrapper around async.task to hide do {} catch {}

import Fiber

async.use(Fiber.self)

async.main {
    async.task {
        async.sleep(until: .now)
    }
}

loop.run()

Releases

No releases published

Packages

No packages published

Languages