Skip to content

Instantly share code, notes, and snippets.

@olbrichj
Created June 14, 2018 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olbrichj/958312fcd5b635280306f2886ed5f1e6 to your computer and use it in GitHub Desktop.
Save olbrichj/958312fcd5b635280306f2886ed5f1e6 to your computer and use it in GitHub Desktop.
func write(_ text: String) {
let words = text.split(separator: " ")
for word in words {
title.append(String(word))
}
}
write("Concurrency with Swift:") // Thread 1
write("What could possibly go wrong?") // Thread 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment