add two long-running XMPP push threads, no more inversion of control
I hope this will be easier to reason about, and less buggy. It was certianly easier to write! An immediate benefit is that with a traversable queue of push requests to select from, the threads can be a lot fairer about choosing which client to service next.
This commit is contained in:
parent
52371274f0
commit
e2b67e0bc4
7 changed files with 166 additions and 107 deletions
|
@ -37,6 +37,7 @@ import Assistant.Threads.PairListener
|
|||
#endif
|
||||
#ifdef WITH_XMPP
|
||||
import Assistant.Threads.XMPPClient
|
||||
import Assistant.Threads.XMPPPusher
|
||||
#endif
|
||||
#else
|
||||
#warning Building without the webapp. You probably need to install Yesod..
|
||||
|
@ -111,6 +112,8 @@ startDaemon assistant foreground listenhost startbrowser = do
|
|||
#endif
|
||||
#ifdef WITH_XMPP
|
||||
, assist $ xmppClientThread urlrenderer
|
||||
, assist $ xmppSendPackThread urlrenderer
|
||||
, assist $ xmppReceivePackThread urlrenderer
|
||||
#endif
|
||||
#endif
|
||||
, assist $ pushThread
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue