10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Event-based <strong>Programming</strong>The following diagram illustrates the order in which the events are placed intothe application event queue if the user clicks Button A, Button B, Button C, andButton D, in that order, from three different frames:In this example, the events execute in the same order in which they are placedon the application event queue. However, events can execute in a differentorder when external or user events are being sent. When a frame is blocked(for example, by a WaitFor), external and user events are still delivered. Theyare not executed until the event that the frame is waiting for arrives. Eventsthat occur later in time for unblocked frames execute before the earlier eventsof the blocked frame.You should not rely on the sequence of events as a means of simulating theeffect of a local procedure. To avoid duplication of code, use a local procedureinstead of sending a user event to the current frame.Order of Events: Event QueuesOpenROAD processes a separate queue for each active frame. If there are twoor more concurrently active frames, there is no guarantee as to the order inwhich the frame queues are processed. Therefore, if you send a user event tomore than one active frame, you cannot assume that the order of sending isthe order of processing.Within a queue, events are processed on a First In First Out (FIFO) basis.When OpenROAD processes the frame queue, it finishes executing the currentevent block before executing the next event in the queue.Managing Event Queues 319

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!