Package org.luwrain.core
Class Event
java.lang.Object
org.luwrain.core.Event
- Direct Known Subclasses:
AreaQuery
,InputEvent
,SystemEvent
,UpdateEvent
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
Signals that the processing of this event is finished.final void
Freezes current thread until this event be processed.
-
Constructor Details
-
Event
public Event()
-
-
Method Details
-
markAsProcessed
public final void markAsProcessed()Signals that the processing of this event is finished. Do not touch this method as it is designed for invocation byorg.luwrain.core.Environment
class only which controls the event loop. Once this method is called, all threads freezed onwaitForBeProcessed()
method continue the execution. -
waitForBeProcessed
Freezes current thread until this event be processed. This method guarantees that the execution will continue after the core completely finishes processing of the event. This method may not be used in the same thread as the main thread of the core (there are no any corresponding checks). The improper use of this method will hang the system infinitely.- Throws:
InterruptedException
- if the thread should terminate
-