Home > Archive > PERL POE > January 2008 > Mixing POE and threads?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Mixing POE and threads?
|
|
| Stephen Nelson 2008-01-26, 8:11 pm |
| Hello fellow POEts,
What's the current wisdom on mixing POE and perl 5.8+ threads?
I'm looking at writing a POE wrapper around the Video::Xine media
playback module. Video::Xine offers a couple of ways of delivering
events (such as "playback complete") to its caller-- you can either
make repeated calls to an event queue, or you can block and wait. (I
already use the "repeated calls" method for Video::PlaybackMachine.)
The only problem is that doing repeated calls appears to make xine
playback jerky, so I'm looking to move to the "block and wait"
method. Xine only works with multithread-safe perls anyway.
I seem to recall that some time ago there was some difficulty with
mixing the two in the past, but I'm not clear on the current status.
I'm thinking about offering a POE::Component::Xine, then having two
subclasses behind the scenes-- one which uses multithreading and one
which does periodic checks. Poco::Xine will serve up whichever
subclass is desired (or seems appropriate).
Thanks for any and all help!
Stephen Nelson
stephenenelson@mac.com
| |
| Stephen Nelson 2008-01-26, 8:11 pm |
| Sorry, I just asked a FAQ. What I meant was, is there any update to
the situation since 2003?
On Jan 26, 2008, at 10:37 AM, Stephen Nelson wrote:
> Hello fellow POEts,
>
> What's the current wisdom on mixing POE and perl 5.8+ threads?
>
> I'm looking at writing a POE wrapper around the Video::Xine media
> playback module. Video::Xine offers a couple of ways of delivering
> events (such as "playback complete") to its caller-- you can either
> make repeated calls to an event queue, or you can block and wait.
> (I already use the "repeated calls" method for
> Video::PlaybackMachine.)
>
> The only problem is that doing repeated calls appears to make xine
> playback jerky, so I'm looking to move to the "block and wait"
> method. Xine only works with multithread-safe perls anyway.
>
> I seem to recall that some time ago there was some difficulty with
> mixing the two in the past, but I'm not clear on the current status.
>
> I'm thinking about offering a POE::Component::Xine, then having two
> subclasses behind the scenes-- one which uses multithreading and
> one which does periodic checks. Poco::Xine will serve up whichever
> subclass is desired (or seems appropriate).
>
> Thanks for any and all help!
>
>
> Stephen Nelson
> stephenenelson@mac.com
>
>
>
| |
| Chris Prather 2008-01-26, 8:11 pm |
|
On Jan 26, 2008, at 12:42 p, Stephen Nelson wrote:
> Sorry, I just asked a FAQ. What I meant was, is there any update to
> the situation since 2003?
>
No not really, least not that I have heard of.
Looking at your issue below, I might try POE::Component::Generic and
run the Video::Xine instance in a separate process (via
Poco::Gernic's internal Wheel::Run). Course this will limit
portability to Windows.
> On Jan 26, 2008, at 10:37 AM, Stephen Nelson wrote:
>
>
|
|
|
|
|