X-Git-Url: https://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fcom%2Fgooglecode%2Flanterna%2Fgui2%2FTextGUIThread.java;h=f76fccde01e9a6940fb9d47aabc89b048951533f;hb=bcb54330afff6a443ab43ee3d38cc7f863c701b7;hp=ba005f86b28a589703f34d04b741fb8a7c560221;hpb=0b0b2b0ff1f5e21f7b0feb955b4b54855fb3d508;p=jvcard.git diff --git a/src/com/googlecode/lanterna/gui2/TextGUIThread.java b/src/com/googlecode/lanterna/gui2/TextGUIThread.java index ba005f8..f76fccd 100644 --- a/src/com/googlecode/lanterna/gui2/TextGUIThread.java +++ b/src/com/googlecode/lanterna/gui2/TextGUIThread.java @@ -31,8 +31,10 @@ import java.io.IOException; */ public interface TextGUIThread { /** - * Invokes custom code on the GUI thread. If the caller is already on the GUI thread, the code is executed immediately - * @param runnable Code to run + * Invokes custom code on the GUI thread. Even if the current thread is the GUI thread, the code will be + * executed at a later time when the event processing is done. + * + * @param runnable Code to run asynchronously * @throws java.lang.IllegalStateException If the GUI thread is not running */ void invokeLater(Runnable runnable) throws IllegalStateException; @@ -51,8 +53,9 @@ public interface TextGUIThread { /** * Schedules custom code to be executed on the GUI thread and waits until the code has been executed before - * returning. - * @param runnable Code to run + * returning. If this is run on the GUI thread, it will immediately run the {@code Runnable} and then return. + * + * @param runnable Code to be run and waited for completion before this method returns * @throws IllegalStateException If the GUI thread is not running * @throws InterruptedException If the caller thread was interrupted while waiting for the task to be executed */