Thread Safety Flag (was Re: [PHP-DEV] Unicode-compatible extensions)

From: Date: Wed, 24 Aug 2005 15:53:39 +0000
Subject: Thread Safety Flag (was Re: [PHP-DEV] Unicode-compatible extensions)
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to internals+get-18369@lists.php.net to get a copy of this message
On Wed, 2005-08-24 at 18:47 +0300, Stanislav Malyshev wrote: > Ah, now I see, so you propose along with "compiled in TS" to have > "actually works in TS" flag. Only problem here is that extension author > may probably not know if it works in TS - TS support is much more > complicated than unicode support usually, especially when dealing with > external libraries. But generally it can be useful too. I'm well aware, however I think even if this flag did nothing but generate a warning it would be useful in both encouraging extension maintainers to verify the TS of their extensions and informing people when they try to use extensions in that environment. Perhaps it would be best if there were a few flags ZEND_THREAD_SAFE, ZEND_THREAD_UNSAFE, ZEND_TS_UNKNOWN. Compiling PHP with TS enabled and UNKNOWN extensions will generate a warning "this might be unstable", trying to use PHP threaded with UNSAFE extension would just blow up. By default all extensions would be set to TS_UNKNOWN and changed as maintainers can do it. John

« previous php.internals (#18369) next »