                 self.regex = NSRegularExpression()
             }
         }
+        dispatch_semaphore_signal(lock)
         super.init()
     }
 


infix operator <~ { associativity none precedence 130 }

private var swiftRegexCache = [String: NSRegularExpression]()

internal final class SwiftRegex: NSObject, BooleanType {

    var regex: NSRegularExpression
    
    init(target:String, pattern:String, options:NSRegularExpressionOptions?) {
        if dispatch_semaphore_wait(lock, dispatch_time(DISPATCH_TIME_NOW, Int64(10 * NSEC_PER_MSEC))) != 0 {
            fatalError("This should never happen")
        }
        
        self.target = target
        if let regex = swiftRegexCache[pattern] {
            self.regex = regex
