4

I'm getting this error printed to stdout when I test run a Haskell program I'm working on. It happens sometimes, not all the time, on identical runs of the program.

forkOS_entry: interrupted

There is a line in the program that calls mask_ $ forkIO to start another thread. I think the error is coming from that thread. Is there a way I can get a better error message or somehow suppress this error message? What is going on? The program seems to run fine regardless.

_ <- mask_ $ forkIO $ mapSSL cafilePath (icSSLWrapPort c) (icHostname c) (icPort c)

dan
  • 43,914
  • 47
  • 153
  • 254

1 Answers1

1

I would check the async package for relevant functions. After stumbling upon the async package, I found the functions to be a bit more reliable to use for my tests. Specifically, the function that might help in this case would be

waitCatch :: Async a -> IO (Either SomeException a)

The Marlow book is a great reference for understanding the concurrency package. I hope that the reference helps. If you can paste a small sample code that I can test with, I might be able to post tested code.

dganti
  • 305
  • 2
  • 11