      * Returns the default bus
      */
     public static func getDefault(webView: UIWebView) -> Caravel {
+        let getExisting = { () -> Caravel in
+            self._default!.setWebView(webView)
+            return self._default!
+        }
+        
         if let d = _default {
-            d.setWebView(webView)
-            return d
-        } else {
-            _default = Caravel(name: "default", webView: webView)
-            return _default!
+            return getExisting()
+        } else {
+            objc_sync_enter(Caravel._defaultInitLock)
+            if _default == nil {
+                _default = Caravel(name: "default", webView: webView)
+                objc_sync_exit(Caravel._defaultInitLock)
+                return _default!
+            } else {
+                objc_sync_exit(Caravel._defaultInitLock)
+                return getExisting()
+            }
         }
     }
     

    
    
    /**
    * Tells if bus has received the init event from JS
    */
    private var _isInitialized: Bool
    private var _initializationLock = NSObject()
    
    /**
     * Pending initialization subscribers

        if name == "default" {
            return getDefault(webView)
        } else {
            let getExisting = { () -> Caravel? in
                for b in self._buses {
                    if b.name == name {
                        b.setWebView(webView)
                        return b
                    }
                }
                
                return nil
            }
            
            if let bus = getExisting() {
                return bus
            } else {
                objc_sync_enter(Caravel._namedBusInitLock)
                if let bus = getExisting() {
                    objc_sync_exit(Caravel._namedBusInitLock)
                    return bus
                } else {
                    var newBus = Caravel(name: name, webView: webView)
                    _buses.append(newBus)
                    objc_sync_exit(Caravel._namedBusInitLock)
                    return newBus
                }
            }
        }
    }
}