Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47467 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5366 invoked from network); 22 Mar 2010 18:38:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Mar 2010 18:38:57 -0000 Authentication-Results: pb1.pair.com header.from=scott@macvicar.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=scott@macvicar.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain macvicar.net from 97.107.131.220 cause and error) X-PHP-List-Original-Sender: scott@macvicar.net X-Host-Fingerprint: 97.107.131.220 whisky.macvicar.net Linux 2.6 Received: from [97.107.131.220] ([97.107.131.220:50541] helo=whisky.macvicar.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/A4-15234-149B7AB4 for ; Mon, 22 Mar 2010 13:38:57 -0500 Received: from [172.24.135.30] (out1-1601fw.corp.tfbnw.net [66.220.144.27]) by whisky.macvicar.net (Postfix) with ESMTP id 95A2546A51; Mon, 22 Mar 2010 14:38:54 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii In-Reply-To: <98b8086f1003221137v1942fba6tee987fe3b4ff4715@mail.gmail.com> Date: Mon, 22 Mar 2010 11:38:53 -0700 Cc: PHP Developers Mailing List Content-Transfer-Encoding: quoted-printable Message-ID: References: <98b8086f1003220751j73a8414es89b9b469c46f6630@mail.gmail.com> <1269270852.1575.141.camel@guybrush> <98b8086f1003220822s47665f87x696b70e9c13dadbd@mail.gmail.com> <98b8086f1003220855ya52c266g8dc4cb866ed451ea@mail.gmail.com> <98b8086f1003221054j161316barf9a772da78f4ca85@mail.gmail.com> <1855ED34-B6FA-4B74-B603-5A0D0A47A5A6@macvicar.net> <98b8086f1003221137v1942fba6tee987fe3b4ff4715@mail.gmail.com> To: troels knak-nielsen X-Mailer: Apple Mail (2.1077) Subject: Re: [PHP-DEV] [PATCH] Raise warning first on "Maximum execution time exceeded" From: scott@macvicar.net (Scott MacVicar) On Mar 22, 2010, at 11:37 AM, troels knak-nielsen wrote: > On Mon, Mar 22, 2010 at 7:10 PM, Scott MacVicar = wrote: >>=20 >> Statics are bad, if its in multithreaded mode and two timeouts happen = at once you'll get some funny behaviour. You need to store this in the = thread local storage so the flag is per thread. >>=20 >=20 > Thanks. My C is severely rusty; Would it simply be a matter of > dropping the "static" modifier, or do I need to get hold of some kind > of handle and attach the flag to that? In which case, what would be > appropriate? You'll see places that have EG(...) that's Executor globals and they're = per thread or static if its single threaded. So if you define your new variable wherever timeout_seconds is defined = you can add it there. I don't have a checkout to hand so can't point you = in the exact place. Scott=