Conversation
qwbarch
commented
Aug 7, 2026
If I'm understanding this right, a new OS thread is created every time Just curious though, I don't know much about this so I'm interested in what your thoughts are! |
Shimuuar
commented
Aug 7, 2026
Yes. I think approach is workable but current implementation deadlocks readily. One have to be very careful about locking: liftIO should release GIL to allow other threads make progress. There's need to distinguish threads spawned by |
Shimuuar
commented
Aug 10, 2026
I've been very-very wrong. I played a bit with |
As it turns out it's possible to cancel python threads asynchronously
We must to try interrupt thread concurrently by throwing haskell and python thread
Shimuuar
commented
Aug 20, 2026
I fixed at very least most of deadlocks. But I tested extensively with python 3.13 and it looks test deadlock reliably with 3.10 & 3.11 |
This prevents it from interrupting next forkOS which happens to be scheduled on same OS thread
It's needed to be able pass interesting RTS options
We're calling single C function. We don't care from where
Uh oh!
There was an error while loading. Please reload this page.
This variant of
runPywhich executes python code in separate OS thread. Mostly useful for async in pythonAt the moment I'm not quite sure that API is right but it works with example in #40
See #40