# Would this thread loop continously

**URL:** <https://www.ruby-forum.com/t/would-this-thread-loop-continously/124740>\
**Category:** Ruby\
**Created:** [January 2, 2008, 1:50am UTC](https://www.ruby-forum.com/t/would-this-thread-loop-continously/124740 "2008-01-02T01:50:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Junkone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e274bd/32.png) [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Post date:** [January 2, 2008, 1:50am UTC](https://www.ruby-forum.com/t/would-this-thread-loop-continously/124740/1 "2008-01-02T01:50:35Z")

</div>

would this thread loop continously or i have to put a while condition  
to force it to loop.

notifierThread=Thread.new do  
ibScan= load ‘ScansNotifier.rb’  
puts " ScansNotifier started "  
sleep(60)  
notifierThread.join  
end

---

<div class="post-metadata">

**Author:** ![Junkone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e274bd/32.png) [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Post date:** [January 2, 2008, 1:57am UTC](https://www.ruby-forum.com/t/would-this-thread-loop-continously/124740/2 "2008-01-02T01:57:02Z")

</div>

Junkone wrote:

> would this thread loop continously or i have to put a while condition  
> to force it to loop.
> 
> notifierThread=Thread.new do  
> ibScan= load ‘ScansNotifier.rb’  
> puts " ScansNotifier started "  
> sleep(60)  
> notifierThread.join  
> end

You _do_ need an explicit loop. It’s an easy one to forget, even after  
years… 🙂
