diff options
| author | Matt Joiner <anacrolix@gmail.com> | 2020-10-02 17:34:14 +1000 |
|---|---|---|
| committer | Matt Joiner <anacrolix@gmail.com> | 2020-10-02 17:34:14 +1000 |
| commit | d34224444e049161c83557e72e88943bd732d89d (patch) | |
| tree | 3eebb9b507ddb1dacd87affe90ff522d52d911a0 /stmutil | |
| parent | Add retry profiling (diff) | |
| download | stm-d34224444e049161c83557e72e88943bd732d89d.tar.gz stm-d34224444e049161c83557e72e88943bd732d89d.tar.xz | |
Use builtin eq var in rate and stmutil
In particular, in the rate limiter this gives a massive performance increase.
Diffstat (limited to 'stmutil')
| -rw-r--r-- | stmutil/context.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stmutil/context.go b/stmutil/context.go index 315abf4..8a4d58d 100644 --- a/stmutil/context.go +++ b/stmutil/context.go @@ -23,7 +23,7 @@ func ContextDoneVar(ctx context.Context) (*stm.Var, func()) { if ctx.Err() != nil { // TODO: What if we had read-only Vars? Then we could have a global one for this that we // just reuse. - v := stm.NewVar(true) + v := stm.NewBuiltinEqVar(true) return v, func() {} } v := stm.NewVar(false) |
