Skip to content

C# basics page lacks crucial information about async code usage #6790

Open
@tvardero

Description

@tvardero

C# basics page does not reflect that scene's methods _Ready and _Process have single threaded synchronization context and should wait for async methods completition only if those have ConfigureAwait(false).

Without ConfigureAwait(false), synchronous wait for async methods will deadlock the application. This also might be familliar to someone who once developed for legacy ASP.NET, or WPF / WinForms apps. Edit: Be careful with ConfigureAwait. Yes, it could help, but it has it's own drawbacks wich might result in syncronization issues or access violations. (see my final comment in the issue #63725)

I don't feel confident enough to make documentation changes, nor confident enought in knowing async / threading model of C# in Godot engine.
True root of the problem could be not a single threaded Scene, but something else.
Sorry for that.

Your Godot version:
Godot 3.4.4
Godot 4 Beta 8 and probably higher

Issue description:
See godotengine/godot#63725

URL to the documentation page:
https://github.com/godotengine/godot-docs/blob/master/tutorials/scripting/c_sharp/c_sharp_basics.rst

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:manualIssues and PRs related to the Manual/Tutorials section of the documentationbugtopic:dotnet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions