summaryrefslogtreecommitdiff
path: root/modules/gdnative/godot/gdnative.h
diff options
context:
space:
mode:
authorRuslan Mustakov <r.mustakov@gmail.com>2017-07-26 15:58:12 +0700
committerRuslan Mustakov <r.mustakov@gmail.com>2017-07-26 19:39:10 +0700
commit7f32023a1ac60b62bd0159a542c25fdad0864dba (patch)
tree8d0bf427ab1c4aa1839479cfe881f6fdca38ef8a /modules/gdnative/godot/gdnative.h
parentf55211ae0dc202cc015c247495af8e05af81b24b (diff)
Support multithreading for NativeScriptLanguage
Godot may call property setters from non-main thread when an object is loaded in the edtior. This means NativeScriptLanguage could be accessed from different threads, but it was not designed for thread-safety. Besides, previous behaviour made it so that godot_nativescript_init and godot_gdnative_init could be invoked from non-main thread, while godot_gdnative_thread is always invoked on the main thread. This may not be expected by the binding library. This commit defers native library initialization to the main thread and adds godot_nativescript_thread_enter and godot_nativescript_thread_exit callbacks to make a binding library aware of foreign threads.
Diffstat (limited to 'modules/gdnative/godot/gdnative.h')
0 files changed, 0 insertions, 0 deletions