Hi,
As you know, I'm currently busy writing a paper on the architecture of Parrot, and during my attempt to describe the exception sub-system, something came to mind. I'm not sure if the event system is fully operational (I thought it was already implemented), but I do know the plan was to check at a regular base if there were any events generated. So, instead of checking after each opcode if an event is pending, this is done every few opcodes in order to safe
time.

So, this brings the danger of introducing delays between sending an event, and their handling (I'm sure this delay is not that bad, but still). Then, I remembered, if an exception is thrown, this is handled immediately by the exception handler (the one the user should have pushed onto the control stack). So, exceptions are handled immediately, while events are not.

Of course, I'm no expert in these things, so please correct me if I'm wrong. But I'm wondering, why the event system hasn't been implemented this way, as an event also has an event handler (just like an exception has an exception handler). (I'm sure there are a lot of implementation details involved, but I'm talking about the big picture here; making sure events are handled immediately).

Thanks in advance for reading this,

klaas-jan

Reply via email to