From 1a7afed06223129c28f33165cd2abff856aca2b8 Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Mon, 21 Sep 2020 02:22:46 +0200 Subject: [PATCH] finish restructuring fediMainThreads contributes to #34 --- src/Hash2Pub/FediChord.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Hash2Pub/FediChord.hs b/src/Hash2Pub/FediChord.hs index 307dc51..0624abd 100644 --- a/src/Hash2Pub/FediChord.hs +++ b/src/Hash2Pub/FediChord.hs @@ -401,7 +401,7 @@ nodeCacheVerifyThread nodeSTM = forever $ do ) (\vss -> if cacheNode `notElem` vss - then queueDeleteEntry (getNid cacheNode) firstVS + then queueDeleteEntry (getNid cacheNode) cacheQ -- after verifying a node, check whether it can be a closer neighbour -- do this for each node -- TODO: optimisation: place all LocalNodeStates on the cache ring and check whether any of them is the predecessor/ successor @@ -661,7 +661,7 @@ fediMainThreads sock nodeSTM = do concurrently_ (stabiliseThread nodeSTM) $ concurrently_ (nodeCacheVerifyThread nodeSTM) $ concurrently_ (convergenceSampleThread nodeSTM) $ - concurrently_ (lookupCacheCleanup $ parentRealNode ns) $ + concurrently_ (lookupCacheCleanup nodeSTM) $ concurrently_ (sendThread sock sendQ) (recvThread sock recvQ)