rfc:deprecate_ticks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
rfc:deprecate_ticks [2021/05/11 08:49] – created nikicrfc:deprecate_ticks [2021/07/02 14:41] (current) nikic
Line 2: Line 2:
   * Date: 2021-05-11   * Date: 2021-05-11
   * Author: Nikita Popov <nikic@php.net>   * Author: Nikita Popov <nikic@php.net>
-  * Status: Under Discussion+  * Status: Withdrawn
   * Target Version: PHP 8.1   * Target Version: PHP 8.1
 +  * Implementation: https://github.com/php/php-src/pull/6967
 +  * Discussion: https://externals.io/message/114368
  
 ===== Introduction ===== ===== Introduction =====
Line 16: Line 18:
  
 Async signals work by setting a VM interrupt flag whenever a signal is received, which will be handled at the next VM interrupt check. This means that async signals do not impose any additional cost, beyond what is always paid to handle timeouts. Async signals work by setting a VM interrupt flag whenever a signal is received, which will be handled at the next VM interrupt check. This means that async signals do not impose any additional cost, beyond what is always paid to handle timeouts.
- 
-Beyond signal handling, I'm not aware of other applications of the ticks mechanism that are still in use today. 
  
 ===== Proposal ===== ===== Proposal =====
Line 28: Line 28:
  
 The removal of the ticks mechanism is expected to have limited impact. The primary user of ticks were pcntl signals, and these are handled through [[https://www.php.net/pcntl_async_signals|async signals]] nowadays. The removal of the ticks mechanism is expected to have limited impact. The primary user of ticks were pcntl signals, and these are handled through [[https://www.php.net/pcntl_async_signals|async signals]] nowadays.
 +
 +It is possible to use ticks to instrument all code by overriding PHP's file stream wrapper and rewriting all included files to add the ''declare(ticks=N)'' directive. Apparently, there are people who use such an approach to monitor performance and memory usage of code.
  
 ===== Vote ===== ===== Vote =====
  
 Yes/No. Yes/No.
rfc/deprecate_ticks.1620722949.txt.gz · Last modified: 2021/05/11 08:49 by nikic