Prevent premature timeouts
Summary: The current implementation may fire timeouts prematurely due to them being put in a bucket that we're about to run. In particular, timeouts that span `WHEEL_SIZE-1` (2.55-2.56s with default interval of 10ms) have very high likelihood of being fired immediately if we have another callback already scheduled. The issue is that we may use a bucket for the next epoch of wheel before the previous epoch drained it. This diff fixes it by using next unprocessed bucket as a base. Reviewed By: yfeldblum, djwatson Differential Revision: D13541502 fbshipit-source-id: 963139e77615750820a63274a1e21929e11184f1
Showing
Please register or sign in to comment