Hi all. I had a talk w/ rocco and he showed me where some of my conceptual
errors concerning POE were and I'm back on track so don't waste any time
with my question if you were planning on it. Thanks!

-----------------------------------------------------------------------------
Brian Knox
Just Another Perl Hacker
perl -le '$_="6110>374086;2064208213:90<307;55";tr[0->][ LEOR!AUBGNSTY];print'

On Tue, 28 Aug 2001 [EMAIL PROTECTED] wrote:

>
> Hello All. I'm working on a project with POE and I'm having a problem.
> Conceptually I understand what the problem is (I think) but I'm not sure
> how to get around it. Here's the goal:
>
> Listen on an opening socket (using Wheel::SocketFactory) for connections.
> Upon connection spawn a session to handle the connection that uses
> Wheel::ReadWrite and Filter::Line. Then, based on input sent across the
> connection, launch various subroutines wrapped with
> POE::Component::SubWrapper and sent the returns to the callback handler.
>
> The goal is that it should be nonblocking. If two clients are attached and
> send requests for a job to be run, I don't want one client to have to wait
> for the other client to finish.
>
> My problem is that they are blocking, and I believe the problem to be in
> the way I am using subwrapper and perhaps my callback state.
>
> However, I'm fairly new to poe and don't understand the way sessions
> interact well enough to figure out how to resolve the issue. This is kind
> of lengthy but let me try to give a rough idea of what I'm doing. I've
> included the actual code for the test script and the package being wrapped
> in a tar attached to this email.
>
> 1) start first session which listens for connection
> 2) on connection, spawn another session which sets up a readwrite
>    wheel with a line buffer and an InputState handler. poeize TestPackage,
>    my package I wish wrapped with subwrapper
> 3) on input, check the input string. do a $poe-kernel->post to a sub in
>    the wrapped package depending on the input string
>
> I have two subs in TestPackage, fast_test and slow_test. slow_test sleeps
> for 10 seconds before it sends a return.
>
> If I connect w/ two clients, then call slow_test from one and fast_test
> from the other... the request to run fast_test does not get processed
> until slow_test has finished.
>
> I'm assuming my problem has something to do with the interaction between
> my sessions and the session that is created by "poeize" in
> POE::Component::SubWrapper but I'm not very clear on how all of this
> interacts.
>
> I'm going to dig through the manpages for a bit. If anyone can be of any
> assistance that is more experienced at this, that would be fantastic.
>
> -----------------------------------------------------------------------------
> Brian Knox
> Just Another Perl Hacker
> perl -le '$_="6110>374086;2064208213:90<307;55";tr[0->][ LEOR!AUBGNSTY];print'
>
>

Reply via email to