POV-Ray : Newsgroups : povray.off-topic : Programming language discussion : Re: Programming language discussion Server Time
4 Sep 2024 01:14:00 EDT (-0400)
  Re: Programming language discussion  
From: Darren New
Date: 23 Oct 2010 13:45:47
Message: <4cc31f4b$1@news.povray.org>
Warp wrote:
> Darren New <dne### [at] sanrrcom> wrote:
>> As for exiting a thread by forcing it to throw an exception, that makes 
>> perfect sense from an implementation point of view.
> 
>   Usually threads are ended by exiting the function that was launched by
> the thread...

Exactly. So the thread equivalent of "exit()" usually throws an exception 
that's generally outside the usual exception hierarchy, in order to unwind 
the stack and cause the top-most function to exit without screwing up other 
threads.  And most thread libraries for languages with exceptions give you a 
way to make that happen in some other thread.

-- 
Darren New, San Diego CA, USA (PST)
   Serving Suggestion:
     "Don't serve this any more. It's awful."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.