on master help sign in
remove some comments
commit9ddfeae9d2707dd6edc79133c19614385b4ceec7 authorHarendra Kumar <harendra.kumar@gmail.com> dateSun 3 Sep 2017, 16:59 (9 years ago) parent3946e8f
1 file changed−10
src/Asyncly/AsyncT.hs−10
src/Asyncly/AsyncT.hs−10
@@ -93,8 +93,6 @@ data ChildEvent a =
9393-- State threaded around the monad for thread management
9494------------------------------------------------------------------------------
9595
96− -- XXX keep just a list of [a] and handle other events out of band as
97− -- exceptions or using atomicModify
9896data Context m a =
9997 Context { outputQueue :: IORef [ChildEvent a]
10098 , doorBell :: MVar Bool -- wakeup mechanism for outQ
@@ -104,14 +102,6 @@ data Context m a =
104102 , queueEmpty :: m Bool
105103 }
106104
107−-- The 'Maybe (AsyncT m a)' is redundant as we can use 'stop' value for the
108−-- Nothing case, but it makes the fold using '<|>' 25% faster. Need to try
109−-- again as the code has gone through many changes after this was tested.
110−-- With the Maybe, 'stop' is required only to represent 'empty' in an
111−-- Alternative composition.
112−--
113−-- Currently the only state we need is the thread context, For generality we
114−-- can parameterize the type with a state type 's'.
115105newtype AsyncT m a =
116106 AsyncT {
117107 runAsyncT :: forall r.