diff options
Diffstat (limited to 'external_test.go')
-rw-r--r-- | external_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/external_test.go b/external_test.go index 201712d..a56aeee 100644 --- a/external_test.go +++ b/external_test.go @@ -78,14 +78,14 @@ func BenchmarkThunderingHerd(b *testing.B) { }() } go func() { - for stm.Atomically(func(tx *stm.Tx) interface{} { + for stm.Atomically(func(tx *stm.Tx) bool { if done.Get(tx) { return false } tx.Assert(tokens.Get(tx) < maxTokens) tokens.Set(tx, tokens.Get(tx)+1) return true - }).(bool) { + }) { } }() stm.Atomically(stm.VoidOperation(func(tx *stm.Tx) { @@ -118,18 +118,18 @@ func BenchmarkInvertedThunderingHerd(b *testing.B) { }() } go func() { - for stm.Atomically(func(tx *stm.Tx) interface{} { + for stm.Atomically(func(tx *stm.Tx) bool { if done.Get(tx) { return false } tx.Assert(tokens.Get(tx) < maxTokens) tokens.Set(tx, tokens.Get(tx)+1) return true - }).(bool) { + }) { } }() go func() { - for stm.Atomically(func(tx *stm.Tx) interface{} { + for stm.Atomically(func(tx *stm.Tx) bool { tx.Assert(tokens.Get(tx) > 0) tokens.Set(tx, tokens.Get(tx)-1) pending.Get(tx).Range(func(i interface{}) bool { @@ -141,7 +141,7 @@ func BenchmarkInvertedThunderingHerd(b *testing.B) { return true }) return !done.Get(tx) - }).(bool) { + }) { } }() stm.Atomically(stm.VoidOperation(func(tx *stm.Tx) { |