Re: [PATCH] Raise warning first on "Maximum execution time exceeded"
| From: | Scott MacVicar | Date: | Mon, 22 Mar 2010 18:38:53 +0000 |
| Subject: | Re: [PATCH] Raise warning first on "Maximum execution time exceeded" | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-47467@lists.php.net to get a copy of this message | ||
On Mar 22, 2010, at 11:37 AM, troels knak-nielsen wrote:
> On Mon, Mar 22, 2010 at 7:10 PM, Scott MacVicar <scott@macvicar.net> wrote:
>>
>> 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.
>>
>
> 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