github.com/loov/combiner@v0.1.0/extcombiner/spin.go (about)

     1  package extcombiner
     2  
     3  import "runtime"
     4  
     5  func spin(v *int) {
     6  	*v++
     7  	if *v >= 8 {
     8  		runtime.Gosched()
     9  	}
    10  }
    11  
    12  const busyspin = 8