Timer and Thread.Sleep()

  • Thread starter Thread starter Ryan Liu
  • Start date Start date
R

Ryan Liu

Hi,

For the taskes which will be executed once a while, I used to write an
endless loop, do the job then call Thread.Sleep().

I just notice threre is server-based Timer. What are the advantages to use
that?

Thanks a lot!
Ryan


BTW, my previous two posts never show up, is this mailing list regulated or
what?
 
Ryan,

Well, the advantage here is that you are not wasting a thread which is
effectively doing nothing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top