I am writing a network application based on the wait / sleep paradigm.
Sometimes connection errors occur, and in my experience itβs worth waiting a while, and then repeat the operation.
The problem is that if I use Thread.Sleep or another similar blocking operation in await / async, it blocks all activity in the caller's thread.
How to replace Thread.Sleep (10000) with the same effect as
await Thread.SleepAsync(10000)
?
UPDATE
I prefer an answer that does this without creating an additional topic
Arsen Zahray Nov 17 '12 at 10:32 2012-11-17 10:32
source share