Cannot await ‘void’ [duplicate]

Thread.sleep(3000) is not awaitable. Your method is async so ideal implementation will be await Task.Delay(3000)

Thread.Sleep is going to block your current thread and Task.Delay is going to delay logically without blocking your current thread.

Thread.sleep should not be used in asynchronous operation instead we should use Task.Delay(3000) and vice versa.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top