From 35b046ddf7eab341256cced9d1c77e168c52e256 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 27 Dec 2020 16:49:46 +0100 Subject: Add an `OS.get_thread_caller_id()` method This can be used to print thread IDs in logs. This can make it easier to debug multi-threaded applications. Co-authored-by: Khaos --- doc/classes/OS.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/classes') diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 65a815a603..f72590f62f 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -127,6 +127,14 @@ Returns the keycode of the given string (e.g. "Escape"). + + + + + Returns the ID of the current thread. This can be used in logs to ease debugging of multi-threaded applications. + [b]Note:[/b] Thread IDs are not deterministic and may be reused across application restarts. + + -- cgit v1.2.3