harry 3 سال پیش
والد
کامیت
d549641536
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  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)
+}