Re: php and multithreading (additional arguments)
| From: | speedy | Date: | Sun, 11 Apr 2010 19:25:54 +0000 |
| Subject: | Re: php and multithreading (additional arguments) | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-47874@lists.php.net to get a copy of this message | ||
Hello Moriyoshi,
Monday, April 5, 2010, 5:57:38 PM, you wrote:
> While it is based on shared-nothing approach, some kinds of resources
> are shared across threads besides classes and functions that would
> have already been defined before the thread creation.
Maybe it would not be so hard incrementally add thread safe constructs like
thread safe string, thread safe array, etc. which would be shared between
threads, similar to current constructs, just access-serialized via mutexes
/ rwsems, protected with memory barriers for the changes to be visible from all
CPUs.
Then, local storage could be done via normal containers, and global via
thread-safe ones.
I'm not sure how could that be exposed on the language level, though.
--
Best regards,
speedy mailto:speedy.spam@gmail.com