Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199901

Re: [PHP3] making dynamic pages pseudo dynamic, reducing sql load From: Richard Lynch (lynch <email protected>)
Date: 01/30/99

At 3:31 PM 1/30/99, Manuel Lemos wrote:
> Usually the parent gets a system private semaphore and shares the key
> with child processes. The way semaphore support is now that can't work
> that way in PHP. You have to explicitly pick semaphore key numbers so
> that the same keys are used by all the concurrent page accesses. If I am
> figuring this right, the problem is that this doesn't seem to prevent
> semaphore reuse by unrelated processes.

I don't know if I'm understanding the issues or if it's infeasible for some
other reason, but it sound to me like you could generate a semaphore key
using uniqueid() and somehow pass that key around among whomever should be
sharing it...

I guess you can't guarantee that some other non-PHP Unix process wouldn't
happen to pick the exact same key... Perhaps you should use
md5(uniqueid()), which reduces the odds to something like 1 in a billion.
An exact figure was computed in this mailing list a while back...

-- "TANSTAAFL" Rich lynch <email protected> webmaster@ and www. all of:
R&B/jazz/blues/rock - jademaze.com music industry org - chatmusic.com
acoustic/funk/world-beat - astrakelly.com sculptures - olivierledoux.com
my own nascent company - l-i-e.com cool coffeehouse - uncommonground.com

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>