SecondaryLoop

Interface SecondaryLoop

public interface SecondaryLoop

A helper interface to run the nested event loop.

Objects that implement this interface are created with the EventQueue.createSecondaryLoop() method. The interface provides two methods, enter() and exit(), which can be used to start and stop the event loop.

When the enter() method is called, the current thread is blocked until the loop is terminated by the exit() method. Also, a new event loop is started on the event dispatch thread, which may or may not be the current thread. The loop can be terminated on any thread by calling its 登录查看完整内容