You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Binder requests from pythonx-concurrent (tracking) #164
1. Parent Job and dispatcher for exposed suspend calls (a caller-supplied CoroutineContext, without adding kotlinx.coroutines to the binder's dependencies).
2. A suspend wrapper over a Python awaitable (await() in Kotlin), submit from any thread, cancellation to Task.cancel().
3. Flow / StateFlow collectable from Python (generic declarations are not exposed today, SPEC U-4).
4. Opaque Kotlin objects as arguments (CoroutineDispatcher, Job).
5. A Python callable as a Kotlin function or Runnable, invokable from any Kotlin thread.
Binder status for the S7.8 request (Kotlin-mode Python on virtual threads): #161 is being fixed with option A. On desktop, the outermost withGIL on a JVM virtual thread raises IllegalStateException, so the carrier-thread mismatch cannot corrupt the interpreter. Run Python on platform threads. Option B (pin the virtual thread under a native frame) needs a public API change (withGIL's block becomes crossinline) and waits for a user decision. Until then S7.8 to S7.12 cannot run Python on virtual threads.
Update for S7.8 to S7.12 (Kotlin-mode Python on virtual threads): #161 option B landed in develop (#337). On desktop, Python can now be entered from a JVM virtual thread. The outermost withGIL pins it to its carrier from PyGILState_Ensure to Release, so parking inside the scope is safe. API change: withGIL { } and Python3.withPython { } take a crossinline block, so a non-local 'return' from inside them no longer compiles. Note: a pinned virtual thread holds its carrier while it waits inside the scope. Not yet verified inside a GraalVM native image.
Activity
b-re-w commentedon Oct 25, 2026
Binder status for the S7.8 request (Kotlin-mode Python on virtual threads): #161 is being fixed with option A. On desktop, the outermost withGIL on a JVM virtual thread raises IllegalStateException, so the carrier-thread mismatch cannot corrupt the interpreter. Run Python on platform threads. Option B (pin the virtual thread under a native frame) needs a public API change (withGIL's block becomes crossinline) and waits for a user decision. Until then S7.8 to S7.12 cannot run Python on virtual threads.
b-re-w commentedon Oct 25, 2026
Update for S7.8 to S7.12 (Kotlin-mode Python on virtual threads): #161 option B landed in develop (#337). On desktop, Python can now be entered from a JVM virtual thread. The outermost withGIL pins it to its carrier from PyGILState_Ensure to Release, so parking inside the scope is safe. API change: withGIL { } and Python3.withPython { } take a crossinline block, so a non-local 'return' from inside them no longer compiles. Note: a pinned virtual thread holds its carrier while it waits inside the scope. Not yet verified inside a GraalVM native image.