Next: , Previous: , Up: Dezyne async   [Contents]


6.2 Applications of ‘async’

An effect of queuing the async event, as if it were an external event, is that it creates a kind of context switch. The current chain of event processing is completed and all Dezyne component queues are emptied before the ack event is fired. This means some interactions become possible which previously were not allowed because of potential circular reference problems. Two such situations are presented in the first 2 examples. In other situations it is just very handy to schedule some actions at a moment you are sure all event processing has finished. The last examples shows this.