instacart / TrueTime.swift

NTP library for Swift and Objective-C. Get the true time impervious to device clock changes.
https://tech.instacart.com/truetime/
Apache License 2.0
588 stars 130 forks source link

I am blocking the main thread and waiting sync till TrueTime responds. But it blocks forever! #94

Open filipesaz opened 3 years ago

filipesaz commented 3 years ago

Hi! I was blocking the main thread and waiting sync for TrueTime response. But it would forever wait!

Upon inspection, I realized that even though TrueTime code appears to be thread-safe, It is issuing some or all of its network calls on CFRunLoopGetMain().

It would seem to me to be better if it did not use the main thread to get its job done. Thanks. Regards.

galdahan commented 2 years ago

Did you find any solution for that problem?