3 ms·
I don't know why you think that it isn't. You can do so, but AFAIK almost no libraries are written with the expectation that their computations might be interru
by WJW 2y ago
I don't know why you think that it isn't. You can do so, but AFAIK almost no libraries are written with the expectation that their computations might be interrupted at any time by another thread. The best you can hope for is that you "only" interrupt some pure computation and not throw your exception into the middle of some delicately sequenced IO side effects.
- whateveracct 2y ago> AFAIK almost no libraries are written with the expectation that their computations might be interrupted at any time by another thread. Haskell libraries are written this way all the time. Exception-safe libraries with async-aware handling are pretty commonplace nowadays (partially thanks to safe-exceptions and unsafeio providing a nice API to deal with them.)
- kccqzy 2y agoAbsolutely false. At least not in my experience. Only novice Haskell programmers write code that can't handle computations being interrupted by another thread. A published and maintained Haskell library is unlikely to have these issues.