         
     }
     func go(closure: ()->()){
-        dispatch_async(dispatch_queue_create(nil, nil)){
+        dispatch_thread{
             self._go(closure)
         }
     }


import Foundation

protocol Locker {
    func lock()
    func unlock()

                var mutex = Mutex()
                for i in idxs {
                    var (c, f, ci) = (s.chans[i], s.cases[i], i)
                    dispatch_thread {
                        var (msg, ok, ready) = c.receive(true, mutex: mutex, flag: &flag)
                        if ready {
                            signal(except: ci)
