Thread termination

Discussion in 'Python' started by Teja, Oct 13, 2006.

  1. Teja

    Teja Guest

    Hi all,

    Does any one know how to terminate or kill a thread that is started
    with "start_new_thread()" in the middle of its execution?

    Any pointers?

    Thanks in advance

    Teja.
    Teja, Oct 13, 2006
    #1
    1. Advertising

  2. Teja schrieb:
    > Hi all,
    >
    > Does any one know how to terminate or kill a thread that is started
    > with "start_new_thread()" in the middle of its execution?
    >
    > Any pointers?


    This has been discussed a bazillion times in this NG. The short answer
    is: no.

    For the long answer: do some googling :)

    Diez
    Diez B. Roggisch, Oct 13, 2006
    #2
    1. Advertising

  3. "Teja" <>wrote:

    > Hi all,
    >
    > Does any one know how to terminate or kill a thread that is started
    > with "start_new_thread()" in the middle of its execution?
    >
    > Any pointers?
    >
    > Thanks in advance
    >
    > Teja.


    can't be done from outside without co operation of thread in question.
    google this newsgroup
    - Hendrik
    Hendrik van Rooyen, Oct 14, 2006
    #3
  4. Hendrik van Rooyen <> wrote:
    > can't be done from outside without co operation of thread in question.
    > google this newsgroup


    Hopefully google will discover also the thread where the above statement is
    proved to be false ;-)

    This might be a useful thing to search for...

    ctypes.pythonapi.PyThreadState_SetAsyncExc

    --
    Nick Craig-Wood <> -- http://www.craig-wood.com/nick
    Nick Craig-Wood, Oct 14, 2006
    #4
  5. "Nick Craig-Wood" <> wrote:


    > Hendrik van Rooyen <> wrote:
    > > can't be done from outside without co operation of thread in question.
    > > google this newsgroup

    >
    > Hopefully google will discover also the thread where the above statement is
    > proved to be false ;-)
    >
    > This might be a useful thing to search for...
    >
    > ctypes.pythonapi.PyThreadState_SetAsyncExc
    >


    Where were you when we needed you some week or two ago?

    I *could* argue that using ctypes is cheating.... - But I wont...

    - Hendrik
    Hendrik van Rooyen, Oct 14, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JezB
    Replies:
    3
    Views:
    21,963
  2. Mike Mimic

    Event after thread termination

    Mike Mimic, Jan 11, 2004, in forum: Java
    Replies:
    5
    Views:
    655
    Chris Smith
    Jan 11, 2004
  3. Alec Wysoker

    Crash in thread on program termination

    Alec Wysoker, Feb 9, 2005, in forum: Python
    Replies:
    1
    Views:
    345
    Peter Hansen
    Feb 9, 2005
  4. Eric Ries
    Replies:
    0
    Views:
    254
    Eric Ries
    Mar 29, 2005
  5. Sanjay
    Replies:
    1
    Views:
    650
    George Ter-Saakov
    Feb 21, 2007
Loading...

Share This Page