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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
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.