note 11546 deleted from function.set-time-limit by jimw
| From: | jimw@php.net | Date: | Sat, 22 Sep 2001 09:42:39 +0000 |
| Subject: | note 11546 deleted from function.set-time-limit by jimw | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18173@lists.php.net to get a copy of this message | ||
I've noticed that using this function doesn't seem to block things that make calls to
services and wait for a response. Setting set_time_limit(2) and then making a call to
gethostbyaddr(ip.that.does.not.resolve) just sits there until it times out.
It would be -really- nice if there was a perl-esque type function like alarm() that lets you set
timeouts for specific sections of code, rather than entire scripts. I'd have great use for a
feature that would enable me to run non crucial pieces of code for a few seconds, and then give up
and move on if it takes too long.