Synco 0.1.0

Synco 0.1.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jan 2016
SPMSupports SPM

Maintained by yukiasai.



Synco 0.1.0

  • By
  • yukiasai

Synco

Simple @syncronized for Swift.

Usage

Lock has sync method. (both instance method and class method)

Instance method
let lock = Lock()

lock.sync {
  // some code
}

let result = lock.sync {
  return "result"
}
Class method
Lock.sync(self) {
  // some code
}

let result = Lock.sync(self) {
  return 1
}

License

Synco is released under the MIT license. See LICENSE for details.