Current Thread

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi,

How I can get access to current thread.
I want to pause it for some seconds.

MyThread.Sleep(2000)

Thanks
 
* (e-mail address removed) (Mike) scripsit:
How I can get access to current thread.
I want to pause it for some seconds.

MyThread.Sleep(2000)

'System.Threading.Thread.Sleep(2000)'.
 
Bismark,
Sleep is a shared method!

Although its allowed, calling Shared methods on an instance variable can be
confusing!

For example:

Dim worker As New Thread(AddressOf Work)
worker.Start()
worker.Sleep(500)

Which thread is put to sleep, the current thread or the worker thread?

Hope this helps
Jay
 
Back
Top