aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-04-05 15:27:33 +0200
committersapier <Sapier at GMX dot net>2014-04-09 21:32:21 +0200
commitedcad09dee6daf119f3e29b0a63837500e7b8b85 (patch)
tree892d763fd20e03d24430565a3883212ef5c1494f /src/script/lua_api
parentd22621efc10859ae68f51fdcb83da422668dfc91 (diff)
downloadminetest-edcad09dee6daf119f3e29b0a63837500e7b8b85.tar.gz
minetest-edcad09dee6daf119f3e29b0a63837500e7b8b85.tar.bz2
minetest-edcad09dee6daf119f3e29b0a63837500e7b8b85.zip
Add support for named threads (atm linux only)
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_async_events.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/lua_api/l_async_events.cpp b/src/script/lua_api/l_async_events.cpp
index 2425f22b2..f5c27a235 100644
--- a/src/script/lua_api/l_async_events.cpp
+++ b/src/script/lua_api/l_async_events.cpp
@@ -262,6 +262,9 @@ void* AsyncWorkerThread::worker_thread_main() {
snprintf(number,sizeof(number),"%d",m_threadnum);
log_register_thread(std::string("AsyncWorkerThread_") + number);
+ porting::setThreadName(
+ std::string(std::string("AsyncWorkTh_") + number).c_str());
+
/** prepare job lua environment **/
lua_newtable(m_LuaStack);
lua_setglobal(m_LuaStack, "engine");