             } else {
                 return loop.run()
             }
-        case .Sema(let sema):
+        case .Sema(_, let sema):
             if let until = until {
                 return sema.wait(until)
             } else {

        let loop = RunLoop.current
        let wakeable:Wakeable = Wakeable(loop: loop)
        
        let signal = HashableAnyContainer {
            wakeable.wake {
                signaled = true
            }
        }
        

        self.value = value
        signals = Array()
        lock = NSLock()
        signaled = try! ThreadLocal()
    }
    
    //TODO: optimise with atomics for value. Will allow to run non-blocked sema faster
