Skip to content

Instantly share code, notes, and snippets.

View makhocheung's full-sized avatar

Nathan Mak makhocheung

  • Canton
View GitHub Profile
@makhocheung
makhocheung / main.swift
Last active December 11, 2021 04:13
A test of task
func wait() async {
await Task.sleep(1000000000)
}
Thread.current.name = "Main thread"
print("Thread in top-level is \(Thread.current.name)")
Task {
print("Thread in task before wait is \(Thread.current.name)")
if Thread.current.name!.isEmpty {