Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 430 Bytes

README.md

File metadata and controls

33 lines (24 loc) · 430 Bytes

ipc

Example

let broadcast = Broadcast<Bool>()

_ = Task.runDetached {
    print(await broadcast.wait())
    // prints true
}

_ = Task.runDetached {
    print(await broadcast.wait())
    // prints true
}

await broadcast.dispatch(true)
let condition = Condition()

_ = Task.runDetached {
    await condition.wait()
}

_ = Task.runDetached {
    await condition.wait()
}

await condition.notify()