diff options
author | Matt Joiner <anacrolix@gmail.com> | 2022-12-21 12:01:08 +1100 |
---|---|---|
committer | Matt Joiner <anacrolix@gmail.com> | 2022-12-21 12:01:08 +1100 |
commit | 32174bfc2d877d4b3df131c9e2c7704a82755443 (patch) | |
tree | 060a68ac810d63f34dd6cff9573e10e876f75a24 /external_test.go | |
parent | Move direct dep out of indirect require block (diff) | |
parent | Remove unnecessary value type for Sets (diff) | |
download | stm-32174bfc2d877d4b3df131c9e2c7704a82755443.tar.gz stm-32174bfc2d877d4b3df131c9e2c7704a82755443.tar.xz |
Merge branch 'generic-immutable'
Diffstat (limited to 'external_test.go')
-rw-r--r-- | external_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/external_test.go b/external_test.go index abdf544..1291cce 100644 --- a/external_test.go +++ b/external_test.go @@ -99,7 +99,7 @@ func BenchmarkInvertedThunderingHerd(b *testing.B) { for i := 0; i < b.N; i++ { done := stm.NewBuiltinEqVar(false) tokens := stm.NewBuiltinEqVar(0) - pending := stm.NewVar(stmutil.NewSet()) + pending := stm.NewVar(stmutil.NewSet[*stm.Var[bool]]()) for range iter.N(1000) { ready := stm.NewVar(false) stm.Atomically(stm.VoidOperation(func(tx *stm.Tx) { @@ -132,8 +132,7 @@ func BenchmarkInvertedThunderingHerd(b *testing.B) { 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 any) bool { - ready := i.(*stm.Var[bool]) + pending.Get(tx).Range(func(ready *stm.Var[bool]) bool { if !ready.Get(tx) { ready.Set(tx, true) return false |