예제 #1
0
func BenchmarkBusy(b *testing.B) {
	r := singletasking.New()
	r.Run(blocker)
	for i := 0; i < b.N; i++ {
		r.Run(blocker)
	}
}
예제 #2
0
func BenchmarkUnblocked(b *testing.B) {
	r := singletasking.New()
	for i := 0; i < b.N; i++ {
		r.Run(void)
	}
}