forkOS_entry:中断的错误:这是什么? [英] forkOS_entry: interrupted error: what is this?
问题描述
当我测试运行我正在运行的Haskell程序时,我得到了打印到标准输出的这个错误。有时,并非所有时间都发生在程序的相同运行中。
forkOS_entry:中断
程序中有一行调用 mask_ $ forkIO
来启动另一行线。我认为错误来自该线程。有没有一种方法可以得到更好的错误信息或以某种方式抑制此错误信息?到底是怎么回事?无论如何,该程序似乎运行良好。
_< - mask_ $ forkIO $ mapSSL cafilePath(icSSLWrapPort c)(icHostname c )(icPort c)
我会检查 async 包相关的功能。在遇到异步包之后,我发现这些函数对于我的测试更加可靠。具体来说,在这种情况下可能有用的函数是
waitCatch :: Async a - > IO(SomeException a)
The Marlow book 是了解并发包的重要参考。我希望参考文献有所帮助。
如果您可以粘贴我可以测试的小范例代码,那么我可以发布测试过的代码。
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)
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.
这篇关于forkOS_entry:中断的错误:这是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!