Commit 9d84589
committed
Waker::will_wake: Compare vtable address instead of its content
Optimize will_wake implementation by comparing vtable address instead
of its content.
The existing best practice to avoid false negatives from will_wake is
to define a waker vtable as a static item. That approach continues to
works with the new implementation.
While this potentially changes the observable behaviour, the function is
documented to work on a best-effort basis. The PartialEq impl for
RawWaker remains as it was.1 parent 062e7c6 commit 9d84589
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
317 | 319 | | |
318 | 320 | | |
319 | 321 | | |
| |||
0 commit comments