Closed antonmarsden closed 4 years ago
I considered using three initially, but realized that it doesn't really buy you that much. Readers already do not ever wait, so the additional map would only really help the writer. It also means that the writer no longer has a way to make readers see updated values, so consistency would suffer.
Is there a particular use-case you had in mind?
The main scenario I was thinking about was readers doing longer "transactions" with the map, and what impact that might have. Purely theoretical though, no practical use cases in mind :)
This isn't really an issue, more of a question. Have you considered using more than 2 internal maps in a "ring"? The benefit would be less waiting on readers, but the down sides are more memory use (but memory is cheap!) and more complicated logic to apply changes to each map in the ring.