SamuelSchlesinger / stm-actor

An implementation of the actor model in Haskell using STM
MIT License
16 stars 3 forks source link

Lower Contention of Liveness Check #6

Closed SamuelSchlesinger closed 4 years ago

SamuelSchlesinger commented 4 years ago

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).

SamuelSchlesinger commented 4 years ago

Nonsense.