forked from async-rs/async-std
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit ff76625
committed
Process timers set for exactly
This fixes a bug wherein the first timer set for exactly `now` ends up
in the `pending` list instead of the `ready` list, eventually resulting
in polling with a timeout of 0.
Under normal circumstances this bug would trigger very rarely, and when
it did would only result in one spurious "loop", since the next time the
timers are checked, time will have advanced.
However, this bug can cause misbehavior and deadlock in emulated
environments. e.g., in the Shadow emulator, time only moves forward when
a blocking syscall is performed, so this bug causes deadlock:
https://gitlab.torproject.org/tpo/core/arti/-/issues/174#note_2762399 now
1 parent 36ab1d2 commit ff76625
1 file changed
+4
-1
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
187 | 187 |
| |
188 | 188 |
| |
189 | 189 |
| |
190 | - | ||
190 | + | ||
191 | + | ||
192 | + | ||
193 | + | ||
191 | 194 |
| |
192 | 195 |
| |
193 | 196 |
| |
|
0 commit comments