NYCPHP Meetup

[nycphp-talk] Re: semaphores on Windows

Ivan Tumanov ivan.nyphp at tumanov.com
Tue Mar 11 16:19:45 EST 2003


Check this page:

http://www.mysql.com/doc/en/Miscellaneous_functions.html

Look up the GET_LOCK, RELEASE_LOCK and IS_FREE_LOCK functions.  I've had
mixed luck using them w/ php because the locking is per-thread, and I have a
suspicion that my trouble came out of some sort of connection-sharing issue.
But this might be whate you're looking for.

-Ivan

-----Original Message-----
From: Emmanuel. M. Decarie [mailto:emm at scriptdigital.com]
Sent: Tuesday, March 11, 2003 9:28 AM
To: NYPHP Talk
Subject: [nycphp-talk] Re: semaphores on Windows


>Hello,
>
>How one would implement semaphores on Windows NT 5.0?
>
>Could I use COM for that? I'm not familiar with Windows.
>
>Or could it be a good idea to use files and flock?
>
>Any ideas? I'm a little bit afraid to implement semaphore by myself
>because it can lead to tricky situations.

I forgot to add  that I need semaphores for INSERT and DELETE sql
statement for MySQL. Maybe this is not needed after all. The rows
that are concerned are using a column with an AUTO_INCREMENT
attribute.

I don't need rollback (i.e. transaction). In its book on MySQL, Paul
Dubois write: "MySQL automatically performs locking for single SQL
statements to keep clients from interfering with each other." (Paul
Dubois, MySQL, New Riders, 2000).

Cheers
-Emmanuel
--
______________________________________________________________________
Emmanuel Décarie / Programmation pour le Web - Programming for the Web
Radio UserLand/Frontier - Perl - PHP - Javascript
<http://scriptdigital.com/>
Blog: <http://blog.scriptdigital.com> - AIM: scriptdigital



--- Unsubscribe at http://nyphp.org/list/ ---





More information about the talk mailing list