-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,15 +35,16 @@ import HStream.Gossip.Types (EventMessage (EventMessage), | |
import qualified HStream.Gossip.Types as T | ||
import HStream.Gossip.Utils (broadcastMessage, | ||
eventNameINIT, eventNameINITED, | ||
incrementTVar, | ||
foreverCatchAll, incrementTVar, | ||
initServerStatus, | ||
updateLamportTime) | ||
import HStream.Gossip.Worker (addToServerList, initGossip) | ||
import qualified HStream.Logger as Log | ||
import qualified HStream.Server.HStreamInternal as I | ||
|
||
-- FIXME: does catch all exception(SomeException) proper here? | ||
runStateHandler :: GossipContext -> IO () | ||
runStateHandler gc@GossipContext{..} = forever $ do | ||
runStateHandler gc@GossipContext{..} = foreverCatchAll True "GossipStateHandler" $ do | ||
newMsgs <- atomically $ do | ||
void $ peekTQueue statePool | ||
flushTQueue statePool | ||
|
@@ -141,8 +142,9 @@ handleStateMessage gc@GossipContext{..} msg@(T.GAlive i [email protected]{..} _n | |
|
||
handleStateMessage _ _ = throwIOError "illegal state message" | ||
|
||
-- FIXME: does catch all exception(SomeException) proper here? | ||
runEventHandler :: GossipContext -> IO () | ||
runEventHandler gc@GossipContext{..} = forever $ do | ||
runEventHandler gc@GossipContext{..} = foreverCatchAll True "GossipEventHandler" $ do | ||
newMsgs <- atomically $ do | ||
void $ peekTQueue eventPool | ||
flushTQueue eventPool | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters