Search Issue Tracker
Duplicate
Votes
0
Found in
2017.1.1f1
Issue ID
957829
Regression
No
[.Net 4.6] Task parallel library continuous to run after exiting Play Mode
How to reproduce:
1. Download attached project file and open "TPLProblem" Scene
2. Enter Play Mode (notice that the messages begin to show in the console tab)
3. Exit Play Mode (notice that the new messages continue to be added)
Expected result: Tasks from the TPL should not run after the play mode is exited
Actual result: Tasks from the TPL continue to run after the play mode is exited
Reproduced with: 2017.1.2f1, 2017.2.0f3, 2017.3.0b4
Comments (1)
-
Bortos
Oct 10, 2017 10:49
I think all threading has had the same 'problem', which stems from Unity running in the same managed environment as your project playing in edit mode. Seems like an insane task to separate them somehow while still supporting inspector working while playing at runtime, and supporting debugging.
If you want your tasks to cancel you should pass a cancellation token and cancel it yourself
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
- Shadows are not visible in Player when using DX12 with Forward+ or Deferred+ rendering in URP
- Rendering Debugger Playmode debug UI scrolling is jittery when using click and drag to scroll
- Frame Debugger Target Selection Search Results window becomes too tiny to even see the default “Editor” selection when there are no search results
- Async method in Play Mode being aborted when calling `new System.Windows.Forms.Form`
- Animator window Eye button on click visual does not cover the whole area of the button when clicked
This is a duplicate of issue #729625