I hereby claim:
- I am randymarsh77 on github.
- I am randymarsh (https://keybase.io/randymarsh) on keybase.
- I have a public key whose fingerprint is 9E24 BCCC 304C 646D 015E FFBA 8E11 F590 3783 9CFA
To claim this, I am signing this object:
public class Bonjour | |
{ | |
public static func Broadcast(_ settings: BroadcastSettings) -> Scope | |
public static func FindAll(_ settings: QuerySettings) -> Task<[NetService]> | |
public static func Resolve(_ service: NetService) -> Task<Void> | |
} |
let Q1 = DispatchQueue(label: "DemoQueue1") | |
let Q2 = DispatchQueue(label: "DemoQueue2") | |
func demo() -> Task<Int> { | |
return async { (task: Task<Int>) in | |
var calculation = 0 | |
Q2.async { | |
print("Doing some expensive calculation of universal truths...") | |
calculation = 42 | |
print("Figured it all out, lets wake up.") |
await (async { | |
print("Awaiting a task begins execution on the same thread.") | |
await (async { | |
print("So we can nest awaits without switching thread contexts.") | |
}) | |
}) |
I hereby claim:
To claim this, I am signing this object: