RE: [PHP-DEV] Re: [PHP] Threading
| From: | Dave Viner | Date: | Thu, 27 Feb 2003 19:56:37 +0000 |
| Subject: | RE: [PHP-DEV] Re: [PHP] Threading | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-94641@lists.php.net to get a copy of this message | ||
i believe that win32 actually does support semaphores. see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/bas
e/using_synchronization.asp
for details on synchronization issues inside win32 (including mutex which is
what i think you're looking for).
or if you don't want a lot of #ifdef WIN32 in your code, you could look at
using Apache Portable Runtime (http://apr.apache.org) to enable mutex
(http://apr.apache.org/docs/apr/group__APR__ThreadMutex.html)
dave
-----Original Message-----
From: Braulio José Solano Rojas [mailto:braulio@bsolano.com]
Sent: Thursday, February 27, 2003 11:12 AM
To: php-dev@lists.php.net
Subject: Re: [PHP-DEV] Re: [PHP] Threading
Hi!
>"George Schlossnagle" <george@omniti.com> escribió en el mensaje
news:F8874747-4A84-11D7-8ACF-000393B2B3C0@omniti.com...
>On Thursday, February 27, 2003, at 01:50 PM, Braulio JosX Solano Rojas
>wrote:
>
> Are there semaphores in PHP?
>
>Yes. I'd recommend a reading of the fine manual.
I did of course.
> Of course if you're actually writing an extension it doesn't matter
> much if the semaphores are implemented in PHP or not, since you'll
> probably just want to use the sysv ipc support of the os yourself,
> without taking it through php userland functions.
I already know about this functionality, but as you know this is only for
Unix. And yes it matters if the semaphores are implemented in PHP since I
need portability between different OSes. (I like Inter-Process Comunication,
I am sorry not to have it on win32).
I am working in an extension that provides functionality to read CDS/ISIS
databases on PHP. Those databases are files (there is not a server, but a
server is planned by the OpenIsis project [1]), so when there is concurrency
we should provide consistent data. There is a paper on different solutions
on how to solve this on PHP [2]. I was thinking of assume the worst case:
PHP as a CGI. But, I am really interested in multi-threading inside PHP.
CDS/ISIS is wide used in latin-america by librarians. If I could have a
multi-platform solution, that would be great.
Regards,
Braulio
[1] http://sourceforge.net/projects/isis
[2] http://openisis.org/openisis/doc/Concurrency
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php