On Wed, Nov 20, 2002 at 11:10:06AM -0500, Al Tobey wrote:
> Is there any standard way to lock up a session for a brief period?

Not currently, but I expect it will become possible sometime in the
future.  As POE::Kernel continues to be refactored, it will be
possible to replace the dispatch mechanism with something different.
A round-robin or priority based scheduler, as opposed to the current
event queue scheduler, would allow sessions to be paused, resumed, and
given dispatch priorities.

I'm sending a copy of this message to [EMAIL PROTECTED] so it's on
file.

-- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

> I have a 2 node replication server that needs to be able to lock 2 of
> it's sessions for a brief period so it can do some database updates
> without any new data being input.  I know there are a bunch of ways to
> implement this in my db routines or even in my sessions, but I thought
> I'd ask anyway to see if there was something already there.
> 
> This is kind of like what I have now ...
> $_[KERNEL]->call( 'my_session', 'lock' );
> $_[KERNEL]->call( 'my_session', 'unlock' );
> 
> where 'lock' sets a timer to automatically unlock the beast after a set
> number of seconds go by (automatic deadlock prevention).
> 
> Maybe a $_[KERNEL]->suspend( 'my_session' ); would be nice to merely
> suspend events temporarily (but still queue them up).  Then I could
> $_[KERNEL]->resume( 'my_session' );.  This might be especially useful
> when Sessions might exist in separate threads or processes (wrap up the
> uglier IPC mechanisms like IPC::SysV).
> 
> Anyways, I have something that works - just hoping for something
> cleaner.
> 
> -Al Tobey

Reply via email to