Update throttle comment

parent 09069891
......@@ -34,7 +34,13 @@ action only as frequently as allowed and other calls are DROPPED. This
is in contrast to things like Conduit throttling, where actions are
just SLOWED DOWN. We use this for asynchronous notifications and, if
messages are the same, we can just drop them safely. Our input is the
provided 'TChan.TChan'. This function should be spawned as a thread.
provided 'TChan.TChan'.
This function should be spawned as a thread.
We provide separate 'id' and 'a'. 'id' is used for uniquely
identifying groups of throttled messages, while 'a' are actual
messages that are sent to 'action' callback.
-}
throttle :: (Ord id, Eq id, Show id) => Int -> TChan.TChan (id, a) -> (a -> IO ()) -> IO ()
throttle delay tchan action = do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment