Commit a20784bd authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

runtime: enable goroutine preemption

All known issues with preemption have beed fixed.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12008044
parent 5c8ad2e1
......@@ -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)
......
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment