mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
threading_model.md: Mention UIUtil.invokeLaterIfNeeded()
This commit is contained in:
parent
3318000ea3
commit
02243ec6c7
@ -549,6 +549,9 @@ Massive batches of VFS events can be pre-processed in the background with [`Asyn
|
||||
|
||||
Use `Application.isDispatchThread()`.
|
||||
|
||||
If code must be invoked on EDT and the current thread can be EDT or BGT, use [`UIUtil.invokeLaterIfNeeded()`](%gh-ic%/platform/util/ui/src/com/intellij/util/ui/UIUtil.java).
|
||||
If the current thread is EDT, this method will run code immediately, or will schedule a later invocation if the current thread is BGT.
|
||||
|
||||
### Why write actions are currently allowed only on EDT?
|
||||
|
||||
Reading data model was often performed on EDT to display results in the UI.
|
||||
|
Loading…
x
Reference in New Issue
Block a user