Commit 3231e4f
authored
Fix infinite timeout passed to CancellationTokenSource.CancelAfter (#84009)
The recent change to introduce ITimer broke CTS.CancelAfter(Timeout.InfiniteTimeSpan). The TimeSpan's milliseconds were extracted as a uint but then ended up being cast to a long, such that rather than representing -1 milliseconds, it represented 4294967295 milliseconds. With the uint representation in Timer, Timeout.UnsignedInfinite needs to be special-cased.1 parent ed921ee commit 3231e4f
File tree
2 files changed
+29
-1
lines changed- src/libraries
- System.Private.CoreLib/src/System/Threading
- System.Threading.Tasks/tests
2 files changed
+29
-1
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
450 | 452 | | |
451 | 453 | | |
452 | 454 | | |
| |||
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1077 | 1077 | | |
1078 | 1078 | | |
1079 | 1079 | | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
1080 | 1106 | | |
1081 | 1107 | | |
1082 | 1108 | | |
| |||
0 commit comments