From e749ba3531cf430b66e1d3f310f53ea2972e3aa3 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 6 Nov 2019 16:14:47 +1100 Subject: Make returns explicit --- bench_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bench_test.go') diff --git a/bench_test.go b/bench_test.go index 0d176d8..82aaba1 100644 --- a/bench_test.go +++ b/bench_test.go @@ -26,15 +26,15 @@ func BenchmarkIncrementSTM(b *testing.B) { // spawn 1000 goroutines that each increment x by 1 x := NewVar(0) for i := 0; i < 1000; i++ { - go Atomically(func(tx *Tx) { + go Atomically(VoidOperation(func(tx *Tx) { cur := tx.Get(x).(int) tx.Set(x, cur+1) - }) + })) } // wait for x to reach 1000 - Atomically(func(tx *Tx) { + Atomically(VoidOperation(func(tx *Tx) { tx.Assert(tx.Get(x).(int) == 1000) - }) + })) } } -- cgit v1.2.3