On Thu, Jul 5, 2012 at 6:38 AM, rex goxman <lists / ruby-forum.com> wrote:

> This is a crappy example, but say you need to do some
> calculation which might fail or even crash, but you don't want (or need)
> to check the inputs to the calculation, or wrap the thing up in an error
> catching mechanism, or anything of this nature.  You just want to
> calculate it, and if it works, fine, and if it doesn't (or even crashes)
> - fine, your main program continues to run.  So spawn a green thread to
> run the calculation.  If it works, great.  If it crashes, who cares?
>

You want threads as a way to silently swallow exceptions? o_O I'm going to
go out on a limb and say that's a terrible application for threads...

You might say "do that with a kernel thread."  But what if I want to
> spawn this thread over and over again in a tight loop?  I don't want or
> need the monstrous overhead of a kernel thread here.  I just want a
> green thread.
>

If the time it takes to spawn a thread is really too much, use a thread
pool.

-- 
Tony Arcieri