godotengine / godotengine/godot-docs
C# basics page lacks crucial information about async code usage
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
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](https://devblogs.microsoft.com/dotnet/configureawait-faq/). _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 https://github.com/godotengine/godot/issues/63725
**URL to the documentation page:**
https://github.com/godotengine/godot-docs/blob/master/tutorials/scripting/c_sharp/c_sharp_basics.rst
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.