I'm having problems intercepting events from a class running under multiple threads.

'------------- BEGIN CODE -----------

Public withevents Protocol as clsProtocol

....
.....
.....

dim t as Thread
For i = 0 to servers.count

Protocol = new clsProtocol(servers(i))
t = new Thread(AddressOf Protocol.Query)
t.start()
Thread.Sleep(0)

next i

.......
.....
.......

Private Sub Protocol_TimeOut(byref p as clsProtocol) Handles Protocol.TimeOut

....
....
.....
End Sub



'-------------------------------------------


Essentially the problem is that out of 3 server instances that raise the event only the last instance actually is caught by the handler. I have no idea why or how to work around this problem....

If this is a bit vague I can elaborate.

Cheers,

Tom