зеркало из https://github.com/mozilla/glean.git
1589504: Fix logic handling timeout of queued tasks
This commit is contained in:
Родитель
d27e4ce99e
Коммит
616e0aa2c6
|
@ -144,12 +144,14 @@ internal object Dispatchers {
|
|||
// wait up to 5 seconds for it to complete, otherwise we will reset the flag so that
|
||||
// new tasks may continue to run.
|
||||
runBlocking {
|
||||
withTimeoutOrNull(QUEUE_PROCESSING_TIMEOUT_MS) {
|
||||
if (withTimeoutOrNull(QUEUE_PROCESSING_TIMEOUT_MS) {
|
||||
job.join()
|
||||
}?.let {
|
||||
} == null) {
|
||||
Log.e(LOG_TAG, "Timeout processing initial tasks queue")
|
||||
queueInitialTasks.set(false)
|
||||
taskQueue.clear()
|
||||
} else {
|
||||
Log.i(LOG_TAG, "Initial tasks queue completed successfully")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче