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 <khaos@khaos-coders.org>
This commit is contained in:
@@ -127,6 +127,14 @@
|
||||
Returns the keycode of the given string (e.g. "Escape").
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_thread_caller_id" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_cmdline_args">
|
||||
<return type="PackedStringArray">
|
||||
</return>
|
||||
|
||||
Reference in New Issue
Block a user