Compute data outside EDT
Answered
I would like to run a thread outside EDT that computes some data to be added to a tree's model. Is there any mechanism (some kind of manager or executor) supporting such things in Platform or do I have to do it on my own, manually?
Please sign in to leave a comment.
It depends. If you need modal progress, use com.intellij.openapi.progress.ProgressManager#runProcessWithProgressSynchronously. If your thread requires read action and might takes a noticeable time, use ReadTask. Otherwise, Application.executeOnPooledThread might be sufficient.
Great! This is what I was looking for. Thanks, Peter!