                 sema.signal()
             }
         }
+    }
+    
+    deinit {
+        _wake.close()
+        _caller.close()
     }
     
     public func semaphore() -> SemaphoreType {

        
        //Yes, exactly. Fail in runtime if we can not create a loop
        self._loop = try! Loop()
        //same with async
        self._wake = try! Async(loop: _loop) { _ in
            sema.wait()

        defer {
            timer.close()
        }
        while until.timeIntervalSinceNow >= 0 {
            _loop.run(mode)
            if once {
                break
