Skip to content

Instantly share code, notes, and snippets.

@almaleh
Last active January 14, 2020 01:22
Show Gist options
  • Select an option

  • Save almaleh/441ba9b0b20b8baae1560ac2f0e9a994 to your computer and use it in GitHub Desktop.

Select an option

Save almaleh/441ba9b0b20b8baae1560ac2f0e9a994 to your computer and use it in GitHub Desktop.
let serial1 = DispatchQueue(label: "com.besher.serial1")
let serial2 = DispatchQueue(label: "com.besher.serial2")
serial1.async {
for _ in 0..<5 { print("🔵") }
}
serial2.async {
for _ in 0..<5 { print("🔴") }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment