Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24234 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21640 invoked by uid 1010); 1 Jul 2006 01:38:23 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 21625 invoked from network); 1 Jul 2006 01:38:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jul 2006 01:38:22 -0000 X-PHP-List-Original-Sender: pollita@php.net X-Host-Fingerprint: 65.111.164.201 danica.alphaweb.net Linux 2.4/2.6 Received: from ([65.111.164.201:44206] helo=danica.alphaweb.net) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 25/0F-15023-B5DC5A44 for ; Fri, 30 Jun 2006 21:18:21 -0400 Received: from talos.alphaweb.net ([69.12.155.129] helo=OHRLVN4523SG) by danica.alphaweb.net with esmtpsa (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.50) id 1FwU7E-0001nW-9J; Fri, 30 Jun 2006 21:17:44 -0400 Message-ID: <001301c69cac$39025540$07000100@OHRLVN4523SG> To: "\"Andrew MatherBt\"" Cc: References: <200606302354.02272.an.dromeda@btconnect.com> Date: Fri, 30 Jun 2006 18:18:02 -0700 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Subject: Re: TSRMLS_D/C persistence From: pollita@php.net ("Sara Golemon") > How long are the TSRMLS_D/C parameters good for? > The life of a given thread. > Can the resultant tsrm_ls value be safely stored? > Yes, but only during the life of a thread. For practical purposes, you should consider this to mean the life of a request since there is no guarantee that subsequent requests will be serviced by the same thread. > I presume the answer is no, and these paramters > should be passed in each time a function is called, > but I would be curious to know differently, if for example > it could be passed in once at (external object) creation time, > and that object could use the trsm_ls directly, rather than the > TSRMLS_D/C semantics. > Yes, and I've done that on more than one occasion. A given tsrm_ls value is tied to a thread (and uniquely identifies that thread). Since a given request never jumps from one thread to another (It stays in the thread it was born in), the tsrm_ls you get at one point in a request will be the tsrm_ls you get at another point in a request. -Sara http://blog.libssh2.org/index.php?/archives/22-What-the-heck-is-TSRMLS_CC-anyway.html