HomePhabricator

efl/timer: correctly handle recursion for timer processing

Authored by zmike on Oct 24 2019, 8:22 AM.

Description

efl/timer: correctly handle recursion for timer processing

if the currently-processed timer is recursively deleted (efl_del) while
it is inside the timer tick event callback, we must correctly handle this
case:

  • in the place where a timer's inlist is de-linked, we must check to see if the timer is the current timer and then update that pointer with the next timer in the list
  • in the post-tick part of timer processing, we must NOT update the current timer pointer if we detect that it has been updated recursively

this fixes processing of timers in the mainloop to trigger more than one legacy timer
per mainloop iteration and likely has some (positive) impact on mainloop throughput

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10515

Marcel Hollerbach <mail@marcel-hollerbach.de> committed rEFLdcc7467c0031: efl/timer: correctly handle recursion for timer processing (authored by zmike).Oct 29 2019, 8:08 AM