• Dmitriy Vyukov's avatar
    runtime: refactor goroutine blocking · f20fd873
    Dmitriy Vyukov authored
    The change is a preparation for the new scheduler.
    It introduces runtime.park() function,
    that will atomically unlock the mutex and park the goroutine.
    It will allow to remove the racy readyonstop flag
    that is difficult to implement w/o the global scheduler mutex.
    
    R=rsc, remyoudompheng, dave
    CC=golang-dev
    https://golang.org/cl/6501077
    f20fd873
sema.goc 3.61 KB