change NodeCache protection to STM

- putting the NodeCache behind an IORef had been chose because those
  could've been read non-blocking
- the same is true for TVars. The performance characteristics are likely
  worse, but at the advantage of composability within STM monads
This commit is contained in:
Trolli Schmittlauch 2020-06-05 22:07:47 +02:00
parent dc2e399d64
commit 914e07a412
4 changed files with 11 additions and 18 deletions

View file

@ -4,7 +4,6 @@ module FediChordSpec where
import Control.Exception
import Data.ASN1.Parse (runParseASN1)
import qualified Data.ByteString as BS
import Data.IORef
import qualified Data.Map.Strict as Map
import Data.Maybe (fromJust)
import qualified Data.Set as Set