On Mon, Jul 15, 2002 at 07:38:02PM -0400, Peter Chen wrote:
> 
> So what's the best way to mark subroutines as POE-safe?
> 
> One idea is to use the "attributes".  So for POE-safe functions, I may
> have:
> 
>   package foo;
>   sub bar : POE_safe { ... }
> 
> In this case, most likely I will have to install Attribute::Handlers and
> define a handler for "POE_safe".  The handler will then register these
> functions as POE-safe.
> 
> A less fancy way of doing this may be simply having a package global
> variable @POE_safe which contains all the POE-safe subroutine names.

The only reason I can think of to use @POE_safe might be if you want
to support older versions of Perl.  Otherwise the attributes sound
fine.

You could do this a third way: PoCo::SOAP can emit events which are
handled by other sessions.  The other sessions can decide whether to
block or not.  I think PoCo::Server::HTTP does this.

-- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sf.net

Reply via email to