Re: Using semaphores in PHP.
| From: | Tom May | Date: | Mon, 16 Nov 1998 18:01:13 +0000 |
| Subject: | Re: Using semaphores in PHP. | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-2432@lists.php.net to get a copy of this message | ||
Jim Winstead <jimw@php.net> writes:
> On Nov 16, Tom May wrote:
> > Any input on whether adding semaphore wrappers would be a reasonable
> > thing to do, and how to deal with the time limit problem (other than
> > not using a time limit)?
>
> Semaphores would be cool, especially if they were cross-platform.
Indeed, but that's not likely to happen even on various flavors of
Unix. All I've got in mind for now are SysV semaphores which have the
useful properties of 1) easily allowing N processes to acquire the
semaphore and 2) automatic undo of semaphore operations when a process
exits for any reason.
> I would
> recommend looking at the resource-list management in PHP as a means of
> registering and cleaning up these semaphores. (Check out php3_list.h,
> list.c, and a module like db.c to see how these functions are used.)
Good idea, I'll see if it does what we need here.
Tom.
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net