From 07559fc63b34b51e5602a8b07ae577f878a6a29f Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 6 Feb 2017 01:10:21 +0200 Subject: [PATCH] stackless: send "func done" notification over a buffered channel, so the funcWorker could process multiple work items without switching to other goroutines --- stackless/func.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stackless/func.go b/stackless/func.go index b00a4de..4202b49 100644 --- a/stackless/func.go +++ b/stackless/func.go @@ -59,7 +59,7 @@ func getFuncWork() *funcWork { v := funcWorkPool.Get() if v == nil { v = &funcWork{ - done: make(chan struct{}), + done: make(chan struct{}, 1), } } return v.(*funcWork)