Class Event

java.lang.Object
org.luwrain.core.Event
Direct Known Subclasses:
AreaQuery, InputEvent, SystemEvent, UpdateEvent

public class Event extends Object
  • 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 by org.luwrain.core.Environment class only which controls the event loop. Once this method is called, all threads freezed on waitForBeProcessed() method continue the execution.
    • waitForBeProcessed

      public final void waitForBeProcessed() throws InterruptedException
      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