SignalCache used to dispatch synchronously instead of asynchronously to its concurrent queue for the I/O operations of loading the cache and backing up the cache to file system which are typically done on app launch and when the app is sent to background respectively. Given how these functions are called, these would be typically blocking the main thread.
Actually, I just realized that the calling code in SignalManager uses an NSTimer to upload the first batch of events on initialization. So this does introduce a race condition as of now.
SignalCache
used to dispatch synchronously instead of asynchronously to its concurrent queue for the I/O operations of loading the cache and backing up the cache to file system which are typically done on app launch and when the app is sent to background respectively. Given how these functions are called, these would be typically blocking the main thread.