Modules depending on different event loops in the same POE app?
I'm working on a simple media control system and I am using POE with Tk. I found the RCU (remote control unit) perl module hierachy to use with my infrared remote control. RCU can be event-controlled, but it is using the Event event loop. Preferably I'd like to have everything controlled by the same event loop and not having to poll the RCU periodically. Is this doable? BR Gunnar
Re: Modules depending on different event loops in the same POE app?
It would probably make sense to run the RCU in a child and have it push events over the pipes of POE::Wheel::Run. Not as monolithic that way, but then you could generalize what kind of interface those two pieces use to chat. At that point you could then replace the RCU part with anything else that also understands the interface. On Sun, 21 Aug 2011 16:55:13 +0200 Gunnar Strand gurra.str...@gmail.com wrote: I'm working on a simple media control system and I am using POE with Tk. I found the RCU (remote control unit) perl module hierachy to use with my infrared remote control. RCU can be event-controlled, but it is using the Event event loop. Preferably I'd like to have everything controlled by the same event loop and not having to poll the RCU periodically. Is this doable? BR Gunnar -- Nicholas Perez XMPP/Email: n...@nickandperla.net http://search.cpan.org/~nperez/ http://github.com/nperez
Re: Modules depending on different event loops in the same POE app?
Yes, I was also thinking along those lines, but I was sort of hoping for possible way to marry the Tk and the Event loops. Since POE can utilize the Tk loop, perhaps Event could have been convinced too. This is really only a one-way communication, so I was thinking about making this a PoCo::Generic session and let it hang in the Event::loop call. Would that work, or would POE hang too? 2011/8/21 Nick Perez n...@nickandperla.net It would probably make sense to run the RCU in a child and have it push events over the pipes of POE::Wheel::Run. Not as monolithic that way, but then you could generalize what kind of interface those two pieces use to chat. At that point you could then replace the RCU part with anything else that also understands the interface. On Sun, 21 Aug 2011 16:55:13 +0200 Gunnar Strand gurra.str...@gmail.com wrote: I'm working on a simple media control system and I am using POE with Tk. I found the RCU (remote control unit) perl module hierachy to use with my infrared remote control. RCU can be event-controlled, but it is using the Event event loop. Preferably I'd like to have everything controlled by the same event loop and not having to poll the RCU periodically. Is this doable? BR Gunnar -- Nicholas Perez XMPP/Email: n...@nickandperla.net http://search.cpan.org/~nperez/ http://github.com/nperez