unsafePerformIO and cooperative concurrency

John Meacham john at repetae.net
Tue Apr 25 20:42:23 EDT 2006

It was pointed out that you can't necessarily know what routines to
avoid in unsafePerformIO without mandating certain things _don't_ use
concurrency, rather than that, how about the following:

"Whether an implementation can yield to another thread inside an
unsafePerformIO action is implementation dependent, however an
implementation should not 'go wrong'" 

hmm.. better term than 'go wrong'? The intent is calling concurrent
routines inside of unsafePerformIO is okay, but they perhaps might not
yield to other threads or something like sharing might be lost (but 
correctness is preserved).

I think implementations should be able to handle this.


John Meacham - ⑆repetae.net⑆john⑈

More information about the Haskell-prime mailing list