note 111428 added to function.pcntl-signal
| From: | ZsoltSzilagyi | Date: | Tue, 19 Feb 2013 09:04:43 +0000 |
| Subject: | note 111428 added to function.pcntl-signal | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-193685@lists.php.net to get a copy of this message | ||
Remember that declaring a tick handler can become really expensive in terms of CPU cycles: Every n
ticks the signal handling overhead will be executed.
So instead of declaring tick=1, test if tick=100 can do the job. If so, you are likely to gain
fivefold speed.
As your script might always might miss some signals due to blocking operations like cURL downloads,
call pcntl_signal_dispatch() on vital spots, e.g. at the beginning of your main loop.
----
Server IP: 69.147.83.199
Probable Submitter: 217.86.227.71
----
Manual Page -- http://php.net/manual/en/function.pcntl-signal.php
Edit -- https://master.php.net/note/edit/111428
Del: integrated -- https://master.php.net/note/delete/111428/integrated
Del: useless -- https://master.php.net/note/delete/111428/useless
Del: bad code -- https://master.php.net/note/delete/111428/bad+code
Del: spam -- https://master.php.net/note/delete/111428/spam
Del: non-english -- https://master.php.net/note/delete/111428/non-english
Del: in docs -- https://master.php.net/note/delete/111428/in+docs
Del: other reasons-- https://master.php.net/note/delete/111428
Reject -- https://master.php.net/note/reject/111428
Search -- https://master.php.net/manage/user-notes.php