3 ms·
Announcing the “stm-containers” library
- kccqzy 9y agoThis needs a (2014) in the title. And no, just to be sure, this library isn't extremely popular. Most of the time, just `TVar (HashMap k a)` is fine.
- carterschonwald 9y agoAdditionally : the best approach in the coming future is gonna be around tools to add new primitive data structure pieces to STM. Which I know there’s at least prelim work towards
- nine_k 9y agoHow does this address the problem outlined in the article? «deleting or inserting a row requires marking the outer TVar as changed, so multiple transactions cannot be modifying the table structure concurrently» I know precious nothing about STM in Haskell, so just asking.
- whateveracct 9y agoTVar (HashMap k v) doesn’t address the problem in the article – it is the problem in the article!
- kccqzy 9y agoMy original comment is in the sense of avoiding premature optimization. For a typical app you likely won’t see the difference.
- whateveracct 9y agoI just use this library instead of hand-composing HashMap+TVar. stm-containers has a nice API already, and you get better performance under load for free.
- platz 9y ago(2014)