mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[qodana] IJPL-162117 Temporary fix of Qodana freeze
GitOrigin-RevId: 44b3cd36ddaf7fb997da6b76a4f6ae78aa6aa6df
This commit is contained in:
committed by
intellij-monorepo-bot
parent
04af11e460
commit
166efbd6f0
@@ -1,6 +1,7 @@
|
|||||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
package com.intellij.internal.statistic.eventLog
|
package com.intellij.internal.statistic.eventLog
|
||||||
|
|
||||||
|
import com.intellij.concurrency.resetThreadContext
|
||||||
import com.intellij.internal.statistic.eventLog.validator.IntellijSensitiveDataValidator
|
import com.intellij.internal.statistic.eventLog.validator.IntellijSensitiveDataValidator
|
||||||
import com.intellij.internal.statistic.utils.StatisticsRecorderUtil
|
import com.intellij.internal.statistic.utils.StatisticsRecorderUtil
|
||||||
import com.intellij.openapi.Disposable
|
import com.intellij.openapi.Disposable
|
||||||
@@ -87,9 +88,11 @@ open class StatisticsFileEventLogger(private val recorderId: String,
|
|||||||
if (StatisticsRecorderUtil.isTestModeEnabled(recorderId)) {
|
if (StatisticsRecorderUtil.isTestModeEnabled(recorderId)) {
|
||||||
lastEventFlushFuture?.cancel(false)
|
lastEventFlushFuture?.cancel(false)
|
||||||
// call flush() instead of logLastEvent() directly so that logLastEvent is executed on the logExecutor thread and not on scheduled executor pool thread
|
// call flush() instead of logLastEvent() directly so that logLastEvent is executed on the logExecutor thread and not on scheduled executor pool thread
|
||||||
|
resetThreadContext().use {
|
||||||
lastEventFlushFuture = AppExecutorUtil.getAppScheduledExecutorService().schedule(this::flush, eventMergeTimeoutMs, TimeUnit.MILLISECONDS)
|
lastEventFlushFuture = AppExecutorUtil.getAppScheduledExecutorService().schedule(this::flush, eventMergeTimeoutMs, TimeUnit.MILLISECONDS)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun logLastEvent() {
|
private fun logLastEvent() {
|
||||||
lastEvent?.let {
|
lastEvent?.let {
|
||||||
|
|||||||
Reference in New Issue
Block a user