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:[EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 11:12 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DEV] Re: [PHP] Threading


Hi!

>"George Schlossnagle" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
>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



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to