Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60586 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17418 invoked from network); 14 May 2012 19:15:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 May 2012 19:15:24 -0000 Received: from [127.0.0.1] ([127.0.0.1:11227]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 4C/F1-03088-BC951BF4 for ; Mon, 14 May 2012 15:15:23 -0400 X-Host-Fingerprint: 65.104.118.106 65.104.118.106.ptr.us.xo.net Received: from [65.104.118.106] ([65.104.118.106:1816] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 97/E1-03088-14351BF4 for ; Mon, 14 May 2012 14:47:29 -0400 To: internals@lists.php.net Date: Mon, 14 May 2012 18:47:28 +0000 (UTC) Message-ID: <2e18b5931575b8ceffde79055640@news.php.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=iso-8859-1; format=flowed X-Newsreader: JetBrains Omea Reader 1098.1 X-Posted-By: 65.104.118.106 Subject: Persist context across threads? From: drueter@assyst.com (David Rueter) I am interested in preserving the complete PHP context for a thread (globals, variables, interpreter, etc.--everything) for later access from a different thread. What would be involved in this? It seems like: 1) Avoid calling ts_free_thread 2) Call tsrm_set_interpreter_context from new thread Is it safe to assume that the context of a terminated thread will not be destroyed or overwritten as long as ts_free_thread is not called? Thanks in advance, David R.