Is there any standard way to lock up a session for a brief period?

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



********************************************************************
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity
to whom they are addressed.  If you have received this 
email in error please notify the Priority Health Information
Services Department at (616) 942-0954.
********************************************************************

Reply via email to