Thread Kill delegate (or something like that)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sheperson@googlemail.com

    #1

    Thread Kill delegate (or something like that)

    Hi,
    When I create a new Thread and start it and after a while I kill the
    thread, how can I auto-invoke a method upon killing the thread?
    I mean is there a delegate or something to use when the thread is
    killed to call a method?
    Thanks in advance.
  • Peter Duniho

    #2
    Re: Thread Kill delegate (or something like that)

    On Wed, 16 Jan 2008 16:52:22 -0800, sheperson@googl email.com
    <sheperson@goog lemail.comwrote :
    Hi,
    When I create a new Thread and start it and after a while I kill the
    thread, how can I auto-invoke a method upon killing the thread?
    I mean is there a delegate or something to use when the thread is
    killed to call a method?
    Don't kill a thread.

    Instead, design the thread code correctly so that it can be signaled to
    exit itself. Then the thread itself can raise an event you've defined to
    signal that it's been terminated.

    Pete

    Comment

    Working...