From 8dac3bf3b10406d05c4d520e81082e490e3b76ff Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 25 Jun 2016 10:40:33 -0300 Subject: Added function to notify ScriptLanguage when a thread is created/freed, allows scripts to allocate a stack there via TLS --- core/script_language.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'core/script_language.cpp') diff --git a/core/script_language.cpp b/core/script_language.cpp index 68a694398..466242d39 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -102,6 +102,22 @@ bool ScriptServer::is_reload_scripts_on_save_enabled() { return reload_scripts_on_save; } +void ScriptServer::thread_enter() { + + for(int i=0;i<_language_count;i++) { + _languages[i]->thread_enter(); + } +} + +void ScriptServer::thread_exit() { + + for(int i=0;i<_language_count;i++) { + _languages[i]->thread_exit(); + } + +} + + void ScriptInstance::get_property_state(List > &state) { List pinfo; -- cgit v1.2.3-70-g09d2