OK, I think I didnt make it clear.
Connect part will be executed in a worker thread which is created by async delegate. So it shouldnt block your UI thread whether it waits one or ten seconds.
to see exactly what happens in your code.
Write a debug statements like this in the beginning of each method:
QueueMessage("<MethodName> "+Thread.GetCurrentThread().IsThreadPoolThread +" "+Thread.GetCurrentThread().GetHashCode());
__________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
|