harry hace 3 años
padre
commit
d549641536
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      BFCommonKit/Classes/BFUtility/PQCommonMethodUtil.swift

+ 5 - 0
BFCommonKit/Classes/BFUtility/PQCommonMethodUtil.swift

@@ -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)
+}