2008/9/10 I=F1aki 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 c=
urrent?
> I mean something as:
>
>  t1 =3D Thread.current
>  Thread.new { t1.sleep }  <--- This doesn't exist (neither #stop or #paus=
e)

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

Cheers

robert

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