SYSK 224: Why Join Is Better Than Sleep
All the “best practices” I’ve seen recommend avoid calling System.Thread.CurrentThread.Sleep() method. Agreed; but there are some legitimate situations when you just have to block for a certain period of time… If that is the case, consider using System.Thread.CurrentThread.Join() instead – just like Sleep, it will blocks the calling thread until a thread terminates or the specified time elapses, but it will continue to perform standard COM and SendMessage pumping
Comment Notification
If you would like to receive an email when updates are made to this post, please register here
Subscribe to this post's comments using