Thread-safety & globals

From: Date: Thu, 05 Oct 2000 00:40:40 +0000
Subject: Thread-safety & globals
Groups: php.dev 
Request: Send a blank email to php-dev+get-34271@lists.php.net to get a copy of this message
I'm a bit in the dark here... threads are something I understand approximately NULL about. But before releasing 4.0.3, I'd really like to fix one thing in InterBase module, because there seems to be some severe problems with the Windows .dll -version (there are some others too... :( , but their fix will wait until 4.0.3 is out). Now, the problem is that unlike all the other database modules, InterBase module still has le_link, le_plink etc. types as part of a structure, created with the macro ZEND_BEGIN_MODULE_GLOBALS(ibase) ... etc. I could have misunderstood the whole way how a module should initialize itself (see bug id 6883) in a multithreaded environment. Is that the right way? Or, I had the opportonity on the last summer to test an evaluation version of Zeus (a multihreaded server working also on Linux), there were some problems there too, but after some testing and defining all of the list entry types to static int instead of keeping them in a module global struct, they disappeared. I know that this approach works and it's the same that all the other database modules use. So, unless I've been told otherwise, I'll commit a version working that way within the next 12 hours and I'd really like to see that end up in 4.0.3. I think I'll commit that version even if I'm told otherwise. The file EXTENSIONS says I'm the primary maintainer of that module. So anything that happens is in any case my fault, and with the new version, I'd guess there'll be a lot of less complaints and bug reports. -- Jouni

« previous php.dev (#34271) next »