centrifugal / centrifuge-swift

Swift client SDK for bidirectional real-time communication with Centrifugo and Centrifuge-based server over WebSocket
MIT License
47 stars 41 forks source link

rewrite code to escape await logic #23

Closed NailxSharipov closed 4 years ago

NailxSharipov commented 4 years ago

write now I have a very weird situation: A lot of awaiting threads screen

NailxSharipov commented 4 years ago

I rewrote all logic with timeout task. All that code are working on sync queue, so you don't need any await in that logic. Which closure had run the first would cancel the other one.

FZambia commented 4 years ago

Looks very good, thanks! Not sure why there was a code with DispatchGroup - most probably it was required on early development stages where not all places used completion callbacks. But I can't say for sure at moment.