netserver/Miscutils.hs
changeset 890 1d8c4a5ec622
parent 889 3bf9dc791f45
child 894 2ca76a7f3121
equal deleted inserted replaced
889:3bf9dc791f45 890:1d8c4a5ec622
    51 			let (ol1, ol2, res) = op ls1 ls2
    51 			let (ol1, ol2, res) = op ls1 ls2
    52 			writeTVar state1 ol1
    52 			writeTVar state1 ol1
    53 			writeTVar state2 ol2
    53 			writeTVar state2 ol2
    54 			return res
    54 			return res
    55 
    55 
    56 tselect :: [ClientInfo] -> STM (String, Handle)
    56 tselect :: [ClientInfo] -> STM (String, ClientInfo)
    57 tselect = foldl orElse retry . map (\ci -> (flip (,) (handle ci)) `fmap` readTChan (chan ci))
    57 tselect = foldl orElse retry . map (\ci -> (flip (,) ci) `fmap` readTChan (chan ci))
    58 
    58