kphp
kphp copied to clipboard
refactor net-level alarm handling
Changes
Refactor system level alarm handling
Before this pr alarm and wakeup have been processed by same *_php_wakeup functions. This pr add *_php_alarm functions for processing situations when c->flags == C_ALARM
Also were added different entry points in PhpWorker lifecycle to execute special logic on alarm
Enable shutdown functions on timeouts in net context
This pr enable shutdown functions for timeouts in net context and add some tests for this cases
Fix sleep functions with timeout
Before this pr f$usleep(...) disable left timeout if it was less then sleeping time and ignore it in future