1
0
mirror of https://github.com/golang/go synced 2024-11-18 08:54:45 -07:00

runtime: enable goroutine preemption

All known issues with preemption have beed fixed.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12008044
This commit is contained in:
Dmitriy Vyukov 2013-07-30 22:17:38 +04:00
parent 5c8ad2e13d
commit a20784bdaf
2 changed files with 1 additions and 3 deletions

View File

@ -2266,7 +2266,7 @@ preemptone(P *p)
// For now, disable.
// The if(1) silences a compiler warning about the rest of the
// function being unreachable.
if(1) return;
if(0) return;
mp = p->m;
if(mp == nil || mp == m)

View File

@ -193,7 +193,6 @@ var preempt = func() int {
}
func TestPreemption(t *testing.T) {
t.Skip("preemption is disabled")
// Test that goroutines are preempted at function calls.
const N = 5
c := make(chan bool)
@ -214,7 +213,6 @@ func TestPreemption(t *testing.T) {
}
func TestPreemptionGC(t *testing.T) {
t.Skip("preemption is disabled")
// Test that pending GC preempts running goroutines.
const P = 5
defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(P + 1))