
26 Mar
2011
26 Mar
'11
11:43 a.m.
On Sat, Mar 26, 2011 at 6:26 AM, Bas van Dijk
On 26 March 2011 10:29, wren ng thornton
wrote: tryReadTChan :: TChan a -> STM (Maybe a)
+1 if we also add: tryReadChan :: Chan a -> IO (Maybe a)
peekTChan :: TChan a -> STM a tryPeekTChan :: TChan a -> STM (Maybe a)
+1 if we also add: peekChan :: Chan a -> IO a tryPeekChan :: Chan a -> IO (Maybe a)
Here's the last time 'tryReadChan' came up, for reference: http://thread.gmane.org/gmane.comp.lang.haskell.libraries/14596 I feel like these sorts of operations are much easier to get right in STM. +1 on adding the above to STM, though. Antoine