At 10:33 AM -0700 5/11/04, chromatic wrote:
On Tue, 2004-05-11 at 10:24, Dan Sugalski wrote:

 >I'm also curious how to write an interface to an existing event system.
 >Being able to write it all in PASM is a bonus.

 I don't think it can be all-PASM, except maybe (and maybe not...)
 with a separate thread for the existing event source. To do it in all
 pasm means calling back into parrot from interrupt level, which isn't
 really doable, or have a thread just waiting on events from the
 alternate event system to post into the parrot event queue.

Another approach may be to expose the PollEvent and WaitEvent functions to the event system as alternate sources of events. If I can do that from PASM, I think I'm okay.

That'll still need some C. The event system as it stands is all active--all event sources put events into the system, rather than having the event system go looking at event sources for events. You'd either need to queue up regular timer events to go check for new stuff or have a thread actively polling the source for events and throwing them into parrot's event queue.
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to