CodeIQ implemented Events, and it seems to have been done well, with one exception. Once an event is activated, there is no way to 'unhandle" the event processing.
You’ll only notice this, because after main() finishes, all the events are still waiting for triggering, and the program must be stopped to shut down the brain…
What’s needed (it seems) is
- Doc in CodeIQ to stop listening,
- When main() ends, all handles disappear. (If you really like current model, just add wait() as last statement. )
- Function to unhandle an event handler from an event (or accept null to signal no more notifications).