Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:1160 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4281 invoked from network); 2 May 2003 11:08:19 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 2 May 2003 11:08:19 -0000 Received: from jdi.jdimedia.nl (jdi.jdimedia.nl [212.204.192.51]) by jdi.jdimedia.nl (8.12.4/8.12.4) with ESMTP id h42B8HC6019524; Fri, 2 May 2003 13:08:18 +0200 Date: Fri, 2 May 2003 13:08:17 +0200 (CEST) X-X-Sender: derick@jdi.jdimedia.nl To: Ananth Kesari cc: internals@lists.php.net In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] To understand ZTS in PHP. From: derick@php.net (Derick Rethans) On Fri, 2 May 2003, Ananth Kesari wrote: > We are developing PHP for NetWare. We have a question here. This could > be a trivia, but still asking to understand more. > > In the TSRM module, and other places also, the code contains ZTS (I > guess ZTS stands for Zend Thread Safety. Am I correct?). From what I > understand this is for providing safety to the threads using mutexes. AFAIK that's the acronym. > Correct me if I am wrong. > > We have a couple of questions on this: > 1. What happens if I do not use ZTS? Can we safely use it on > production servers which get multiple requests? As long as you don't have multiple threads you can do without ZTS. AFAIK Netware has no concept of processes and only threads, so you will need ZTS. > 2. Is ZTS platform specific? We need to see if we "really" need this to > be enabled on NetWare. It doesn't really depend on the platform, but more on the SAPI. IIS uses threads to process scripts, Apache 1.3 uses processes, CGI is always a process, Apache 2 can do both threaded processing or the old Apache 1.3 method. > 3. Why is ZTS an option and not mandatory? It's selected by the SAPI module you use, ZTS slows down performance (a bit) and it buys nothing when a webserver is not processing requests in threads like Apache 1.3 Derick -- "my other box is your windows PC" ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ -------------------------------------------------------------------------