Re: [APC-DEV] atomaticity/thread safeness of apc shared memory functions+ mutexes

From: Date: Thu, 25 Dec 2008 00:26:20 +0000
Subject: Re: [APC-DEV] atomaticity/thread safeness of apc shared memory functions+ mutexes
References: 1 2 3  Groups: php.apc.dev 
Request: Send a blank email to php-apc-dev+get-176@lists.php.net to get a copy of this message
Exception e wrote: > Rasmus Lerdorf schreef: > >> Yes, they are atomic and they are locked appropriately. You don't need >> any sort of mutex. This is shared memory. Generally we don't suggest >> running PHP in any sort of threaded environment though. > > To respond to your last remark: php processes can be exectuted in > parallel by Apache—at least this is my understanding. So if I need to > work with multiple shared memory entries per request i still need > mutexes in order to lock concurrent access to these pieces. That's not multi-threading, that is multi-processing, and of course APC handles that correctly and locks appropriately. Multi-threading is when you have multiple threads of execution within the same process. -Rasmus

« previous php.apc.dev (#176) next »