On Sep 5, 2005, at 21:37, Jay Strauss wrote:
Rocco Caputo wrote:
On Sep 5, 2005, at 17:43, Jay Strauss wrote:
I'm getting "POE::Kernel's run() method was never called." error
when my script that calls the code below ends.
I could put a ->run and ->("shutdown") into a sub DESTROY. But
is there a way I'm supposed to avoid this error.
POE::Kernel isn't designed to run without run() being called from
the top level. Your code avoids some initialization and cleanup
that run () does.
Rocco, I appreciate the code. I'm not familiar with socket
programming enough to feel comfortable rolling my own.
Based on what you said, I don't understand then how you'd ever use
the run_one_timeslice method then. If you need to call ->run, then
your program is stuck running and doesn't drop down to further
code, until "shutdown".
How would you ever get to the code to do the run_one_timeslice
portion?
I always figured that the people who wanted a run_one_timeslice()
would use it to embed procedural code in their event-driven
programs. I never considered that they might use it to write
procedural, single-tasking network libraries. To be honest, I think
a simple procedural client is better off using blocking sockets and
read/write loops than to invoke POE in a single-processing fashion.
Otherwise I wouldn't be doing it in my own programs.
--
Rocco Caputo - rcaputo@xxxxxxxxx
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|