2008/9/10 Iki Baz Castillo <ibc / aliax.net>:
> Hi, is there any difference between doing:
>
>  sleep
>
> and:
>
>  Thread.stop
>

#sleep resumes automatically after a given time, #stop does not.

> In both cases the current thread is in "sleep" state.
>
> Also, why there is no way to stop/pause/sleep a thread different of the current?
> I mean something as:
>
>  t1 = Thread.current
>  Thread.new { t1.sleep }  <--- This doesn't exist (neither #stop or #pause)

Why should it?  With threads you use other mechanisms to control
execution, e.g. a blocking queue, synchronizing on a mutex etc.

Cheers

robert

-- 
use.inject do |as, often| as.you_can - without end