I'm new to threading, and am completely baffled.
Currently I have something like the following:
Currently, the loop requires MyFunctionThatTakesForeverToComplete to complete before proceding to the next iteration. What can i do to get around this? Am I even on the right track?
Currently I have something like the following:
Code:
lbl.Text = "start sending to queue"
for i = 0 to 100
[COLOR=green]' do some work[/color]
SyncLock MyQueue.SyncRoot
MyQueue.Enqueue(MyFunctionThatTakesForeverToComplete)
_waitQueue.Set()
End SyncLock
[COLOR=green]' do other work that does not require
' MyFunctionThatTakesForeverToComplete to complete[/color]
next
lbl.Text = "everything's queued"
Currently, the loop requires MyFunctionThatTakesForeverToComplete to complete before proceding to the next iteration. What can i do to get around this? Am I even on the right track?