Adding thread instance to list taking time in hosted server, working fine in debug mode

I have a multi threaded application. Each thread instance is added to a thread list and on lock, this list count is checked to make sure it contains any thread. This is working fine in debug mode, however once hosted to server, execution of lock trigger first before adding thread instance to the thread list. Since we check the list count on lock, thread execution never happens unless we give a sleep.

Detailed code below:

Dim lstThreads As New Generic.List(Of System.Threading.Thread)


Public Function GetData()
Thread t1= New Thread(AddressOf executeFunction)
t1.Name = nameVariable
t1.Start()
lstThreads.Add(t1)

Public Function executeFunction()
SyncLock lockObj
Thread.Sleep(3000)  //**without sleep, thread obj not getting added to the list**
If lstThreads IsNot Nothing AndAlso lstThreads.Count > 0 Then //count always zero while not using Sleep```
               ..........