From: lover ruby Date: 2011-10-12T05:24:29+09:00 Subject: Re: scheduler and thread Sam Duncan wrote in post #1026126: > On 12/10/11 05:04, lover ruby wrote: >>> Then you must not #join in the method that start the thread as Sam >> >> 1318348633 >> 1318348638 >> 1318348643 >> 1318348633 >> 1318348638 >> 1318348643 >> ..........Forever, always print out number every 5 seconds >> > > Can you explain what you mean by "still need sleep 20"? > > Sam Hi Sam I understand now. The reason I said "still need sleep 20" was: I had experience with GUI application which is always on. So there was no need for sleep command. But now I have a cmd (Windows DOS, xterm) application which terminates at the last command. The only way to keep program alive is sleep command. So to keep it alive forever, I change sleep 20 to sleep. It is really my fault; I did think in GUI world for cmd world. Thanks for help, Sam. I apply your advanced Timer class in my program. Ruby lover. -- Posted via http://www.ruby-forum.com/.