Conversation
|
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! |
|
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 |
|
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
|
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
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