aboutsummaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.cpp
diff options
context:
space:
mode:
authorAdam Cigánek2018-05-14 12:22:20 +0200
committerHein-Pieter van Braam2018-06-01 18:07:32 +0200
commitb95cc40640738f0c26b80b5ec96b4301858916cf (patch)
tree0f049327764b668aa3efffb9ecd32eb106a3db2b /modules/gdscript/gdscript_parser.cpp
parent9294978596d0fe05d54f7a07aa9dda17b29b3faa (diff)
downloadgodot-b95cc40640738f0c26b80b5ec96b4301858916cf.tar.gz
godot-b95cc40640738f0c26b80b5ec96b4301858916cf.tar.zst
godot-b95cc40640738f0c26b80b5ec96b4301858916cf.zip
Set current SynchronizationContext before the game loop starts
This fixes the problem that `SynchronizationContext.Current` would be null during the call to `_EnterTree`, `_Ready` and the first call to `_Process` thus the task continuations would be scheduled outside the main thread, which is unexpected and might lead to crashes. With this change, task continuations are scheduled always on the main thread and so async/await can be used without any explicit synchronization, which is what is expected. Fixes #18849 (cherry picked from commit f25240cfe6a4b7f030b2dfd5db1365b4de44301d)
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
0 files changed, 0 insertions, 0 deletions