views:

20

answers:

0

I have an application wich is multi-user and only one user can do a specific action and has to wait for another user to finish is task.

Right now it's implemented with spin lock like so:

while(($Application = Application::LoadLock($_SESSION['userid'], $_SESSION['DB'])) === false) 
    usleep(100000);

But this way the transition aren't smooth at all !

Any Ideas to make this run faster

Thanks
-Gui