stackless: send "func done" notification over a buffered channel, so the funcWorker could process multiple work items without switching to other goroutines

This commit is contained in:
Aliaksandr Valialkin
2017-02-06 01:10:21 +02:00
parent 5abb44878e
commit 07559fc63b
+1 -1
View File
@@ -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)