Re: tick callbacks
| From: | Andi Gutmans | Date: | Sun, 03 Sep 2000 04:37:43 +0000 |
| Subject: | Re: tick callbacks | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-31720@lists.php.net to get a copy of this message | ||
At 02:56 PM 9/2/00 -0500, Andrei Zmievski wrote:
On Sat, 02 Sep 2000, André Langhorst wrote: so you can calculate the number of times your functions are beeing executed, by doing a) add all "1" in declared *plus* one b) divide by ticks I think it happens because 'declare' statement is included in the number of statements considered to be 'ticked'. IMHO, it's undesirable behavior and I hope it can be fixed. Andi, Zeev?I don't know if there's an off by one error here but I just want you to be aware that when we implemented ticks and what we agreed on is that it's a very "unscientific" way of giving timeslices to background processing which is useful for checking if some unblocking I/O function has already finished or not etc.. You're not really supposed to be able to count (as far as I remember) exactly how many ticks are going to execute nor rely on that. i.e. don't use a counter in your functions and rely on it reaching the exact number you think. It's bad programming because you might end up adding more statements in the middle and you'll forget to update your tick function. ticks aren't for general purpose programming but really here to solve some specific issues. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/