|
|
|
|
Re: Display.getDefault().syncExec(...) deadlock? [message #660511 is a reply to message #660507] |
Fri, 18 March 2011 17:34 |
Eric Jain Messages: 266 Registered: July 2009 |
Senior Member |
|
|
David Wegener wrote on Fri, 18 March 2011 13:12 | If the code that is calling syncExec is running on the display thread, then this will cause the deadlock [...]
|
Thanks for the explanation. However, I don't understand why calling syncExec from the display thread doesn't deadlock all the time? In fact, the following code never seems to deadlock:
Display.getCurrent().syncExec(new Runnable() {
@Override
public void run() {
log.debug("=== sync exec ===");
Display.getCurrent().syncExec(new Runnable() {
@Override
public void run() {
log.debug("=== sync exec ===");
}
});
}
});
log.debug("=== done ===");
[Updated on: Fri, 18 March 2011 17:35] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01988 seconds