Search Issue Tracker
By Design
Votes
0
Found in
2018.2.0b3
2018.2.4f1
Issue ID
1079087
Regression
Yes
Canceling an Iteration with small delay values let it iterate after the cancellation request
To reproduce:
1. Download attached project "TaskDelay.zip" and open in Unity
2. Open "SampleScene" scene
3. Select "TDelay" gameObject in Hierarchy and in Inspector window set "Millis Delay to 21 or bigger
4. Enter Play mode
5. Press the "C" button in keyboard
6. Observe that in Console returned value of "Token.IsCancellationRequested" is false as expected before the "TaskCanceledException" is thrown
7. Exit Play mode
8. Select "TDelay" gameObject in Hierarchy and in Inspector window set "Millis Delay to 20 or less
9. Enter Play mode
10. Press the "C" button in keyboard
11. Observe that in Console returned value of "Token.IsCancellationRequested" is true before the "TaskCanceledException" is thrown
Notes:
- This issue appears on both Windows and OSX
- In VisualStudio 2017 the returned value of "Token.IsCancellationRequested" is always false even if "millisDelay" = 1
Reproduced on Unity 2018.2.0b3, 2018.2.8f1, 2018.3.0b2 and 2019.1.0a1
Not reproduced on Unity 2018.2.0b2 (96999d86066c)
Regression on Unity 2018.2.0b3 (0a6b93065060)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- NullReferenceException when setting 'isTextObjectScaleStatic' to false on a disabled TextMeshPro GameObject
- Shader Stripping Custom Options disappear when exiting Play mode without reloading Domain
- Decals do not get projected when 'Rendering Layer Mask' on a GameObject is 23rd Layer or above due to encoding/decoding issues
- Deriving from SearchContextAttribute doesn't always work
- Scripting API documentation is missing for macOS editor extensions
Resolution Note (2019.1.X):
This behavior reproduces in a winforms application, so I believe it is correct behavior