|
![]() |
![]()
|
![]() Dispatch The TDispatch class subclasses from AThread, an abstract class that uses the host system to create a Posix thread that runs independently of the host UI thread. The Guildhall dispatcher gathers all events from an event queue filled by both the host system and Guildhall applets. It then prioritizes them and distributes them according to the current Guildhall desktop structure. This is intentionally reminiscent of how Classic Mac worked as can be seen in the following diagram.
This scheme amounts to cooperative multitasking, not preemptive multitasking, but in practice I haven't noticed much difference. And for my purposes, it's convenient that all the synchronization issues go away. If an applet has the Guildhall thread, no other applet is running. It simplifies a lot of coding issues. Constructible Classes TDispatch (but only Guildhall startup constructs this) |