Quote Originally Posted by coolcurrent4u View Post
hello thanks jmcilhinney for this brief,

in the class approach of this threading, will this method avoid data overwriting (race condition) since the same DoWork will be used by multiple threads
since you say

vb Code:
  1. Private Sub InitiateThread()
  2.     Dim w As New Worker
  3.  
  4.     w.Data = 100
  5.  
  6.     Dim t As New Thread(AddressOf w.DoWork)
  7.  
  8.     t.Start()
  9. End Sub
But it's not the same DoWork method. You're creating a new Worker object each time and each of those objects has its own Data property and DoWork method. It would only be if you used the same Worker object each time or Worker was a module or a class with Shared members that you would experience interference between threads.