Timer: Don't run new task at old timepoint
* Fix a race condition that the task is just finished but IsScheduled is true * Fix a bug where cancelling the old task will make new task run at the previous task's scheduled timepoint * Protect racing read/write to message_loop_thread_ in RunTask() and Cancel() by storing a local reference to message_loop_thread_ in RunTask() Bug: 116081383 Test: Run bluetooth_test_common.TimerTest reschedule_task_dont_invoke_new_task_early schedule_task for multiple times Change-Id: I737a864e1b061adbcd41245711e0d3e8adf448d4
Loading
Please register or sign in to comment