Go Scheduler issue with sync.Mutex using gccgo
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
This commit is contained in:
parent
4832a3dc2d
commit
b0e927fed5
4 changed files with 21 additions and 1 deletions
13
ioutils/scheduler_gccgo.go
Normal file
13
ioutils/scheduler_gccgo.go
Normal 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()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue