Created
June 14, 2018 17:14
-
-
Save olbrichj/b5966cfc3877dd85fb3b1c233c2cddb1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var title : [String] = [] | |
var lock = NSLock() | |
func write(_ text: String) { | |
let words = text.split(separator: " ") | |
lock.lock() | |
for word in words { | |
title.append(String(word)) | |
print(word) | |
} | |
lock.unlock() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment