[Next] [Up] [Previous]
Next: Audio formatting using Up: Combining different spaces Previous: Synchronization

Tracking busy components

To preserve the scope rules of AFL, two tables are used to record busy components. Table busy-table, with global scope, has one entry for each component, and all its entries are initially false. When a loop forever event is started on a component, the corresponding entry in busy-table is set to true. Once a component has become busy, no other events can be executed on it; but its current state can be changed, e.g., the pitch of the sound that is playing on a busy component could be changed.

When a block terminates, only loop forever events commenced inside that block are aborted. To implement this, we introduce table local-busy-table with an entry for each component. This table is local to the AFL block, and all its entries are initialized to false. When terminating a block, entries in the local copy of local-busy-table are checked to determine the components whose loop forever events are to be aborted.

Thus, when terminating a block, the following steps are performed in sequence:

  1. Wait for completion of events on components whose busy-table entry is false.
  2. Abort ongoing events on components whose entry in the local-busy-table is true.



TV Raman
Thu Mar 9 20:10:41 EST 1995