Closed fosskers closed 7 years ago
Rather than explaining extensible effects and chrome casting is it possible to make a very simple version that reproduces this problem?
Sure, I'll fire up a pure IO
example and see what happens.
This reproduces the problem:
cast' :: Text -> IO ()
cast' t = do
void . shelly . asyncSh $ do
run_ "castnow" [t, "--quiet"]
liftIO $ putStrLn "Yeah!!!"
liftIO (myThreadId >>= killThread) -- Kill thread after casting completes.
Interesting, when run without --quiet
, castnow
reports Idle...
when finished playing. It doesn't usually do that when ran normally from the command line.
It seems that when forked to the background (even normally in the terminal), castnow
hangs when finished playing. This isn't a Shelly problem, then.
Hi again, still loving Shelly.
I'm experiencing a weird hang:
where
ERL
is a type alias for a longextensible-effects
signature I have,Eff
is the effect Monad, andeffShelly
just catches any IO exception from Shelly and rethrows withextensible-effects
mechanics.Definitions aside, I'm finding that the
run_
(which has in theory been forked) never returns. While the file I'm sending to ChromeCast does finish playing,run_
never returns and I never see theYeah!
printed, nor is the thread killed. The thread survives indefinitely and hogs thecastnow
CLI program.Thoughts?