Re: [APC-DEV] atomaticity/thread safeness of apc shared memory functions+ mutexes
[email protected] (Exception e) Thu, 25 Dec 2008 00:47:37 +0100
| Newsgroups | php.apc.dev |
|---|---|
| Message-ID | <[email protected]> |
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. With a web server you don't have a guarantee that requests are all handled sequentially. If I am wrong, Im happy to be corrected!