PyThreadState_SetAsyncExc (nThreadId ??????, exc);

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • iwl

    #1

    PyThreadState_SetAsyncExc (nThreadId ??????, exc);

    what is the nThreadId-Parameter of PyThreadState_S etAsyncExc?

    I try to implement a Terminate-Button in my C-Prog for my
    embedded Python, but its hard to find an example how to
    stop an interpreter running in an thread.

    I found no other Python C-App-Func returning such a parameter.

  • Karl H.

    #2
    Re: PyThreadState_S etAsyncExc (nThreadId ??????, exc);

    iwl wrote:
    what is the nThreadId-Parameter of PyThreadState_S etAsyncExc?
    >
    I try to implement a Terminate-Button in my C-Prog for my
    embedded Python, but its hard to find an example how to
    stop an interpreter running in an thread.
    >
    I found no other Python C-App-Func returning such a parameter.
    >
    Use the "thread_id" member of the PyThreadState object:

    PyThreadState *tstate;

    PyThreadState_S etAsyncExc(tsta te->thread_id,exc) ;

    -Karl

    Comment

    Working...