aboutsummaryrefslogtreecommitdiff
path: root/external_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'external_test.go')
-rw-r--r--external_test.go5
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