mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
read action assertion
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
package com.intellij.concurrency;
|
||||
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.impl.ApplicationImpl;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
import java.util.concurrent.PriorityBlockingQueue;
|
||||
@@ -62,7 +63,13 @@ public class JobSchedulerImpl extends JobScheduler implements Disposable {
|
||||
Runnable task = ourQueue.poll();
|
||||
if (task == null) return false;
|
||||
|
||||
task.run();
|
||||
boolean wasMarked = ApplicationImpl.setExceptionalThreadWithReadAccessFlag(false);
|
||||
try {
|
||||
task.run();
|
||||
}
|
||||
finally {
|
||||
if (wasMarked) ApplicationImpl.setExceptionalThreadWithReadAccessFlag(true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user