Commits


Gil authored and GitHub committed f1b10df362a
Don't use the address of a TimeSlot as a key for removal (#4212) After a TimeSlot executes, it deletes itself and removes itself from ExecutorLibdispatch's schedule_. The DelayedOperation still refered to this now freed address. If another TimeSlot is scheduled and operator new happens to allocate a TimeSlot that reuses the address, and the DelayedOperation is subsequently canceled, this will cancel the new task before it has run. This change fixes this by using a dedicated counter for TimeSlots that effectively isn't reused. Note that while it is possible for the counter to wrap around, this would take tens of years of continuous execution to happen and require cancelation of TimeSlot created tens of years ago to create the possibility of collision which is a sufficiently impractical problem as to be ignorable.