summaryrefslogtreecommitdiff
path: root/core/class_db.cpp
diff options
context:
space:
mode:
authorAdam Cigánek <adam.ciganek@gmail.com>2018-05-14 12:22:20 +0200
committerAdam Cigánek <adam.ciganek@gmail.com>2018-05-15 15:09:40 +0200
commitf25240cfe6a4b7f030b2dfd5db1365b4de44301d (patch)
treeba44cad8086685db559fae989e23ca0caec0e796 /core/class_db.cpp
parent81b1d3c846de263cf843e9e0e9d7c0c0a94f65c8 (diff)
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
Diffstat (limited to 'core/class_db.cpp')
0 files changed, 0 insertions, 0 deletions