Bug #3830 Updated: Function to timeout/break off a function
| From: | torben@php.net | Date: | Mon, 28 Jan 2002 23:14:30 +0000 |
| Subject: | Bug #3830 Updated: Function to timeout/break off a function | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-78365@lists.php.net to get a copy of this message | ||
ID: 3830
Updated by: torben
Reported By: wico@cnh.nl
Old Status: Closed
Status: Open
Bug Type: Feature/Change Request
Operating System: linux
Old PHP Version: 4.0 Beta 4 Patch Level 1
PHP Version: 4.2.0-dev
New Comment:
No, you can't. :) The ticks stuff won't stop a function which
is tied up in a function call such as sleep. This does sound
like something which would be nice to have...
I've also updated the version number on this to 4.2.0-dev
Torben
Previous Comments:
------------------------------------------------------------------------
[2002-01-28 16:54:34] yohgaki@php.net
register_tick_function() can be used.
------------------------------------------------------------------------
[2000-07-31 22:49:52] waldschrott@php.net
well, could be quite nice
------------------------------------------------------------------------
[2000-03-14 11:27:16] wico@cnh.nl
Hiya,
i did like to see a function wich breaks into another when it take to
long:
<?
funtion Hour () {
sleep 3600;
}
// break after say 2 secs
$timeout = Timeout_function(hour(), 2);
if ($timeout) {
// function took to long
} else {
// function compledet normal
}
?>
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=3830&edit=1