]> Cypherpunks repositories - gostls13.git/commit
runtime: refactor goroutine blocking
authorDmitriy Vyukov <dvyukov@google.com>
Tue, 18 Sep 2012 17:15:46 +0000 (21:15 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Tue, 18 Sep 2012 17:15:46 +0000 (21:15 +0400)
commitf20fd87384d152ed91439e824333fbb78688e741
tree555ce56d7b34e0eac187ef3e65d3dd8578054553
parente4389c008a223213fc3f506756f38d695cf60d40
runtime: refactor goroutine blocking
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
src/pkg/runtime/chan.c
src/pkg/runtime/mgc0.c
src/pkg/runtime/proc.c
src/pkg/runtime/runtime.h
src/pkg/runtime/sema.goc
src/pkg/runtime/time.goc