explain non-determinism bug
This commit is contained in:
parent
3413ec8740
commit
2a9e848541
@ -122,7 +122,12 @@ impl MouseInterpolator{
|
|||||||
// case 3: stop
|
// case 3: stop
|
||||||
// a mouse event is buffered, but no mouse events have transpired within 10ms
|
// a mouse event is buffered, but no mouse events have transpired within 10ms
|
||||||
|
|
||||||
// push buffered mouse instruction and flush buffer to output
|
// This is a potential source of non-determinism
|
||||||
|
// since the timestamp from the first instruction after timeout is used
|
||||||
|
// and not the precise timeout timestamp.
|
||||||
|
// This can be fixed by polling the mouse interpolator for timeout externally
|
||||||
|
// and then conditionally running the timeout right before every instruction.
|
||||||
|
// Essentially moving this if statement outside where the timer is accessible.
|
||||||
if self.get_mouse_timedout_at(ins.time).is_some(){
|
if self.get_mouse_timedout_at(ins.time).is_some(){
|
||||||
// push buffered mouse instruction and flush buffer to output
|
// push buffered mouse instruction and flush buffer to output
|
||||||
self.timeout_mouse(ins.instruction.time);
|
self.timeout_mouse(ins.instruction.time);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user