amb26/infusion — comment on commit 3b65f07bd10f8991f0e74bd2dbcb7edc1cb39d92
File:  line 0
By michelled:

I asked amb26 to clarify how the listenerEngine works and here is what he said:

This thing is the "core event mutiplexer".... the thing that enables what we might call "waitsets".
It is now possible to boil events so that they are derived from multiple parent events, and not just one.
What this thing is trying to do is to tell if each of the base events in the "waitset" have fired once yet.
You can see that every time one of the base events fires, a note is made in "argstruc" on line 666.
So when they have all fired once, you will no longer find any "undefined" entries in the structure.
And so once you don't find any more undefined entries, you know it is time to fire the boiled event, and then clear the structure waiting to trigger again
The set of keys is basically just the configuration that the user wrote in the options block.
You have to give each base event some kind of name in the structure.