Hi Moriyoshi,
Thanks for replying.

My question is very simple.
Please answer the following question.
1)Zend has global_class_table of type HashTable with a key as the class
name ('char*') and value of type 'zend_class_entry**'. True or False?

As I look at the code the above statement seems to be true. 
If it is the case to duplicate the global_class_table for each thread,
we need to double dereferencing for each class in the
global_class_table.(As the value is of type zend_class_entry** in the
HashTable.)

Having this deep copy implementation inside zend_hash_copy which is a
generic function responsible for copying any two hash table cannot be
used for this specific case of double dereferencing.

My statement about this global_class_table copy is not correct. But
somehow it is working.

If the answer to the above question is False. I can show the piece of
code from where I have come to a answer of 'True'.

Thanks

With regards
Kamesh Jayachandran
On Wed, 7 Jul 2004 23:50:59 +0900, "Moriyoshi Koizumi"
<[EMAIL PROTECTED]> said:
> 
> On 2004/07/07, at 14:18, Kamesh Jayachandran wrote:
> 
> >>> In this case while making a copy og global_class_table to thread
> >>> specific class_table in a deep fashion. zend_hash_copy has to do the
> >>> double dereferencing which it can't being a generic fuinction.
> 
> Sorry, but I don't quite understand what you meant in the above 
> paragraph.
> Is it a threading / race related issue that you are pointing out here?
> 
> As far as I know, only the global class table is shared across threads
> and is duplicated to emulate fork() behaviour, as the compiler global is
> actually a thread specific value (that is, a separate instance is
> prepared for each thread.)
> 
> Moriyoshi
> 

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to