RE: [PHP-CVS] cvs: php4 /win32 time.c
| From: | Andi Gutmans | Date: | Mon, 05 Feb 2001 20:43:25 +0000 |
| Subject: | RE: [PHP-CVS] cvs: php4 /win32 time.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-3916@lists.php.net to get a copy of this message | ||
Does this variable need to be a true global?
If it does then it has to be mutexed. Having said that if two threads want to change it and you think it doesn't really matter which one will "win" then you can probably live without the mutex.
Andi
At 10:35 AM 2/5/2001 +0000, James Moore wrote:
I don't think you should be using static variables in the functions. Don't forget that you might have more than one thread accessing this function at a time (unless you came to the conclusion that a race here can't do any harm). I dont think race conditions here will do any real harm but then again its probably best to be safe. Having said that I am not 100% sure on how to make it thread safe either which I would like to do. Are there any documents or guidlines anywhere I can read about this? Its probably a good chance to learn. James -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net