http://qs321.pair.com?node_id=709038


in reply to POE, Sessons, POE::Wheel::Run and program flow

As soon as the new Session with the Wheel::Run in it is fired, the session returns to the JobQueue saying it is finished. This isn't true, it should only be returning finished once the ChildClosed event is done in the Wheel::Run.
That shouldn't be happening. The job should be signaled as being finished only after calling the postback callback.

It's kinda hard to tell exactly how your program flow is without seeing the actual code. The code snippets in your previous thread don't give me enough of an idea to tell where it's going wrong. The only thing I notice is that you do not use the $postback anywhere in your worker session. Maybe that's it.

Try stuffing the $postback into the session's heap, and call it when you receive the ChildClosed event, or perhaps in the session's _end handler.