Skip to content

Instantly share code, notes, and snippets.

View comfly's full-sized avatar
:electron:

Dmitry Zakharov comfly

:electron:
  • Yandex
  • St. Petersburg
View GitHub Profile
let queue = dispatch_queue_create("QUEUE", DISPATCH_QUEUE_CONCURRENT)
var holder: Int = 10
func readSafe() -> Int {
var read: Int!
dispatch_sync(queue) {
read = holder
}
return read