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?

0
2 comments
Official 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.

Avatar
Permanently deleted user

Great! This is what I was looking for. Thanks, Peter!

0

Please sign in to leave a comment.