From cced8596d2fe2b35e373853382551756281d4602 Mon Sep 17 00:00:00 2001 From: joe Date: Sun, 23 Jul 2017 18:24:08 -0400 Subject: Rewrite: new bootstrap function. --- Mainline.hs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Mainline.hs') diff --git a/Mainline.hs b/Mainline.hs index 1e30b718..fdb77b4d 100644 --- a/Mainline.hs +++ b/Mainline.hs @@ -308,8 +308,14 @@ newClient addr = do sched6 <- newTVar Int.empty return $ Routing tenative_info sched4 tbl4 committee4 sched6 tbl6 committee6 -- TODO: Provide some means of shutting down these two auxillary threads: - refresh_thread4 <- pollForRefresh (15*60) (sched4 routing) (refreshBucket nodeSearch (routing4 routing) (nodeId tenative_info)) - refresh_thread6 <- pollForRefresh (15*60) (sched6 routing) (refreshBucket nodeSearch (routing6 routing) (nodeId tenative_info)) + refresh_thread4 <- forkPollForRefresh + (15*60) + (sched4 routing) + (refreshBucket nodeSearch (routing4 routing) (nodeId tenative_info)) + refresh_thread6 <- forkPollForRefresh + (15*60) + (sched6 routing) + (refreshBucket nodeSearch (routing6 routing) (nodeId tenative_info)) swarms <- newSwarmsDatabase map_var <- atomically $ newTVar (0, mempty) let net = onInbound (updateRouting outgoingClient routing) -- cgit v1.2.3