Correct, when you load Rex, regular old Kernel.sleep becomes threadsafe.
See:

https://github.com/rapid7/metasploit-framework/blob/591a2c35296a362327f5fdc27009d07fdbdaa890/lib/rex.rb#L96



On Fri, Apr 18, 2014 at 8:07 AM, Josh <notifications@github.com> wrote:

> In modules/auxiliary/gather/dns_reverse_lookup.rb:
>
> >        while (tl.length <= @threadnum)
> >          ip = ar.next_ip
> >          break if not ip
> >          tl << framework.threads.spawn("Module(#{self.refname})-#{ip}", false, ip.dup) do |tip|
> >            begin
> > +            sleep(sleep_time)
>
> I believe sleep proxies to Rex::Sleep these days does it not @todb<https://github.com/todb>
> ?
> ... <#14574f303e5d4dc3_>
> -Josh
>  On Apr 17, 2014, at 18:03, Spencer McIntyre <notifications@github.com>
> wrote: In modules/auxiliary/gather/dns_reverse_lookup.rb: > while
> (tl.length <= @threadnum) > ip = ar.next_ip > break if not ip > tl <<
> framework.threads.spawn("Module(#{self.refname})-#{ip}", false, ip.dup) do
> |tip| > begin > + sleep(sleep_time) Rex.sleep(sleep_time) is preferred over
> the sleep function -- Reply to this email directly or view it on GitHub.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/rapid7/metasploit-framework/pull/3264/files#r11771139>
> .
>



-- 
"Tod Beardsley" <todb@packetfu.com> | 512-438-9165 | @todb
   Such coin, plz send: DBgsRuWGWh3pkb6CAPnzM8NJjcH9nnVZo5