Go Scheduler issue with sync.Mutex using gccgo

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
This commit is contained in:
root 2015-07-09 23:23:03 +00:00
parent 4832a3dc2d
commit b0e927fed5
4 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,13 @@
// +build gccgo
package ioutils
import (
"runtime"
)
func callSchedulerIfNecessary() {
//allow or force Go scheduler to switch context, without explicitly
//forcing this will make it hang when using gccgo implementation
runtime.Gosched()
}