1 2 3 4 5 6 7 8 9 10 11 12 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() }