Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > PyThreadState_SetAsyncExc (nThreadId ??????, exc);

Reply
Thread Tools

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

 
 
iwl
Guest
Posts: n/a
 
      12-14-2006
what is the nThreadId-Parameter of PyThreadState_SetAsyncExc?

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.

 
Reply With Quote
 
 
 
 
Karl H.
Guest
Posts: n/a
 
      12-14-2006
iwl wrote:
> what is the nThreadId-Parameter of PyThreadState_SetAsyncExc?
>
> 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_SetAsyncExc(tstate->thread_id,exc);

-Karl
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PyThreadState_SetAsyncExc, PyErr_Clear and boost::python gabriel.becedillas@gmail.com Python 0 05-10-2006 06:23 PM
PyThreadState_SetAsyncExc and native extensions gabriel.becedillas@gmail.com Python 0 04-25-2006 07:10 PM
Using PyThreadState_SetAsyncExc with PyEval_CallObject spam_john@comcast.net Python 0 08-11-2005 04:17 PM
raising an exception in one thread from an other. (PyThreadState_SetAsyncExc) Antoon Pardon Python 0 03-15-2005 09:58 AM
PyThreadState_SetAsyncExc ignores except: clause Bob Alistar Python 0 12-04-2003 10:34 AM



Advertisments