We can lower the contention of the liveness checks by using more than one TVar, perhaps even a configurable amount, and allowing the user to check only one of them. This is a clunkier API, as we cannot do random selection in STM without using unsafeIOtoSTM or whatever it's called (and I'd like to avoid that). If we lower the contention substantially, then we can do these checks by default in addAfterEffect and send without feeling guilty about it.
This is complicating, and would complicate the code, which is already much more complex than I would like it to be (people in the nonexistent audience might laugh, as it is quite short, but still).
We can lower the contention of the liveness checks by using more than one
TVar
, perhaps even a configurable amount, and allowing the user to check only one of them. This is a clunkier API, as we cannot do random selection inSTM
without usingunsafeIOtoSTM
or whatever it's called (and I'd like to avoid that). If we lower the contention substantially, then we can do these checks by default inaddAfterEffect
andsend
without feeling guilty about it.This is complicating, and would complicate the code, which is already much more complex than I would like it to be (people in the nonexistent audience might laugh, as it is quite short, but still).