Reputation: 121
I am trying to use Display.getDefault().asyncExec to execute some work i need to do on my eclipse plugin but i need to wait until this work is done. I cannot wait for the thread without pausing the UI. How do i wait for Display?
Upvotes: 0
Views: 457
Reputation: 170815
I am trying to use Display.getDefault().asyncExec to execute some work i need to do on my eclipse plugin but i need to wait until this work is done
Either use syncExec
instead, which will return when the work is done, or add a call to the code which needs to wait at the end of the Runnable
you pass to asyncExec
.
Upvotes: 1