mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WaitForFinishedCodeAnalysis: add assert about running on EDT
GitOrigin-RevId: 1945123e84014380c52dde1e59db597b574792f0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a3a39924ca
commit
4150882157
+3
@@ -130,6 +130,9 @@ class CodeAnalysisStateListener(val project: Project, val cs: CoroutineScope) {
|
||||
* @throws TimeoutException when stopped due to provided [timeout]
|
||||
*/
|
||||
suspend fun waitAnalysisToFinish(timeout: Duration? = 5.minutes, throws: Boolean = false, logsError: Boolean = true) {
|
||||
if (EDT.isCurrentThreadEdt()) {
|
||||
throw AssertionError("waitAnalysisToFinish should not be called from EDT otherwise there will be freezes")
|
||||
}
|
||||
LOG.info("Waiting for code analysis to finish in $timeout")
|
||||
val future = CompletableFuture<Unit>()
|
||||
if (timeout != null) {
|
||||
|
||||
Reference in New Issue
Block a user