Using TChan with Timeout
问题 I have a TChan as input for a thread which should behave like this: If sombody writes to the TChan within a specific time, the content should be retrieved. If there is nothing written within the specified time, it should unblock and continue with Nothing . My attempt on this was to use the timeout function from System.Timeout like this: timeout 1000000 $ atomically $ readTChan pktChannel This seemed to work but now I discovered, that I am sometimes loosing packets (they are written to the