Alright, so even when I switched to the safe `mkWeakTVar` I still see the exact same issue. I've also reduced the minimal reproducing program to:

    import Pipes.Concurrent

    main = do
        (_, input) <- spawn Unbounded
        atomically $ recv input

It seems like something has fundamentally changed about how weak references interact with STM transactions in ghc-7.8. Right now I am trying to see if there is some other way to accomplish the same behavior without weak references.

On 7/7/14, 3:53 PM, Michael Thompson wrote:
The bit about user input was nonsense; the example wasn't using the `user` it defined. Here is a more minimal main (with the same `worker`):

    main = do
        (output, input) <- spawn (Bounded 1)
        a1  <- async $ runEffect $ fromInput input  >-> worker 1
        a2  <- async $ runEffect $ yield 1 >->  toOutput output
        wait a1
        wait a2

      $ ./work
     Worker #1: Processed 1
     work: thread blocked indefinitely in an STM transaction

It works if a higher `Bounded` or if `Unbounded` is chosen; it works if the second `wait` is dropped, etc. The most striking difference was the use of `Unbounded` in the good version and `Bounded` in the separate module.



--
You received this message because you are subscribed to the Google Groups "Haskell Pipes" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.

--
You received this message because you are subscribed to the Google Groups "Haskell 
Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to