css322 gmail.com> writes:
>
> (1) A worker thread calls Py_AddPendingCall and assigns a handler function.
> (2) When the Python interpreter runs, it calls the handler function whenever
it yields control to another thread
Not exactly. As the documentation says: "If successful, func will be called
I have an embedded Python program which runs in a thread in C.
When the Python interpreter switches thread context (yielding control to
another thread), I'd like to be notified so I can perform certain necessary
operations.
It seems that Py_AddPendingCall is exactly what I'm looking for. Howeve