Re: Threadpool thread termination.



objectref wrote:
> hi to all folks here,
>
> let's say that i am using a threadpool and somehow, some threads in
> it just stuck.
> (endless loop or something like that).

They're stuck. You had better write them so that they don't go into an
endless loop.

Officially a .NET thread is an abstract unit. In practice in .NET v 1.1
there is a one to one correspondence between .NET threads and OS
threads, and so conceivably you could use Win32 to terminate a thread
pool thread. However terminating a thread in Win32 is not a nice thing
to do because you'll lose data, and so it's best not to do that.

Basically there is no alternative other than making sure that the code
that you'll run on the thread pool thread does not go into an endless
loop. If it's code that yiu do not have access to the source then
metaphorically give them a kick up the arse.

Richard
--
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm


.



Relevant Pages

  • Re: [PHP] PostTrack Reminder
    ... If we was going for that he would just get it stuck in an endless loop again and send hundreds of messages through the system:P ... Good chance that I will be right there with you depending on a side job and when I get the content:) (Hi Boss if you're reading this! ... Jason Pruim ...
    (php.general)
  • Re: MSG- sold out message at 12:02
    ... I got through on the phone at exactly 12, and then got stuck in an ... endless loop. ... but I won't do that anymore. ... I don't mind that level ...
    (rec.music.artists.springsteen)
  • HELP! - Stuck in safe mode when running "atisgkaf.sys"
    ... My computer can't boot into Safe Mode. ... It's always STUCK ... seems running a endless loop. ...
    (microsoft.public.windowsxp.general)
  • Re: Delphi-debugger-limit: 65534 lines in file ?
    ... I had to terminate the ... process as Delphi was completely stuck. ... The little debugging blue dots that show the ... > 100,000 line PAS file and check this problem out? ...
    (borland.public.delphi.non-technical)
  • Re: QUERY QUESTION
    ... Your caps lock key is stuck. ... Please unstick it. ... What do you mean by "terminate"? ... that "terminates" until the set of records is returned to the caller. ...
    (microsoft.public.access.queries)