Search Issue Tracker
By Design
Votes
1
Found in
2021.3.45f1
2022.3.50f1
6000.0.23f1
6000.1.0a1
Issue ID
UUM-84920
Regression
No
CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
Reproduction steps:
1. Open the attached “repro-cts-unity-webgl.zip” project
2. Build and Run for WebGL (File > Build and Run)
3. In the Player press the “Start” button
4. Observe the text next to the button
Expected result: “Is Cancelled: True” text is visible
Actual result: “Is Cancelled: False” text is visible
Reproducible with: 2021.3.45f1, 2022.3.50f1, 6000.0.23f1, 6000.1.0a1
Reproducible on: Windows 11, macOS 15.0.1 (M1 Pro)
Not reproducible on: no other environment tested
Note:
- Does not reproduce in the Editor or Windows build
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
- Blank, Light-Themed "Create Node" window becomes visible on the next project open
- UI Elements/Layout inconsistencies in the Particle System component
- The Game view and Scene view fail to render when launching the Editor with a maximized Render Graph Viewer window
- "List is empty" is poorly visible in the "Create Node" window
- [Android] GameObject with a custom shader becomes invisible when deployed with the Vulkan Graphics API
Resolution Note:
Thank you for reporting a bug to Unity.
Managed (C#) threads aren’t supported due to the lack of a multithreaded garbage collection feature in WebAssembly.
Due to this limitation, anything in the C# System.Threading namespace isn’t supported. For example, any timeouts specified in System.Threading.CancellationTokenSource don’t actually time out, because the cancellation mechanism is based on System.Threading.Timer.
For more information please refer to "Lack of managed threading support" section of our documentation https://docs.unity3d.com/6000.1/Documentation/Manual/webgl-technical-overview.html.
Today we will be closing this case. Thank you again for taking the time to report this issue.