Date: 09/03/00
- Next message: Andi Gutmans: "Re: [PHP-DEV] tick callbacks,not concurrently?"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #6465 Updated: Weird warnings about non-existent files"
- In reply to: Andrei Zmievski: "Re: [PHP-DEV] tick callbacks"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <email protected>> http://www.zend.com/-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andi Gutmans: "Re: [PHP-DEV] tick callbacks,not concurrently?"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #6465 Updated: Weird warnings about non-existent files"
- In reply to: Andrei Zmievski: "Re: [PHP-DEV] tick callbacks"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

