@@ -933,3 +933,8 @@ public func currentBundlePath() -> Bundle?{
return Bundle(url: associateBundleURL!)
}
+public func synced(_ lock: Any, closure: () -> ()) {
+ objc_sync_enter(lock)
+ closure()
+ objc_sync_exit(lock)
+}