Date: 10/05/00
- Next message: Andi Gutmans: "RE: [PHP-DEV] PHP 4.0.3RC1"
- Previous message: Howard Cohodas: "RE: [PHP-DEV] PHP 4.0.3RC1"
- In reply to: Jouni Ahto: "[PHP-DEV] Thread-safety & globals"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 03:40 AM 10/5/00 +0300, Jouni Ahto wrote:
>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?
Check out the MySQL module. le_link, le_plink and friends are registered
types. These should be true globals and should sit in interbase.c (with a
note that they should be true globals even in a multi-threaded environment)
and be only initialized on MINIT() once. The rest of the per-thread
variables should be in the ZEND_BEGIN_MODULE_GLOBALS(...) section like you
mentioned.
>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.
Yes as I mention above this is the right way to do it. You're only supposed
to mention the tyes once.
>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.
Just make sure you test it first to see that it works :)
Andi
--- Andi Gutmans <andi <email protected>> http://www.zend.com/-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andi Gutmans: "RE: [PHP-DEV] PHP 4.0.3RC1"
- Previous message: Howard Cohodas: "RE: [PHP-DEV] PHP 4.0.3RC1"
- In reply to: Jouni Ahto: "[PHP-DEV] Thread-safety & globals"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

