Feature #1440

Updated by Zbigniew Rebacz over 5 years ago

<pre><code class="cpp">
class Thread {
// Probably some kind of synchronization is need.
void setName(const String& name) { this->name = name; }
String getName() const { return name; }

// On starting thread we should use platform depend code that set thread name on system side.
}
</code></pre>



POSIX documentation for set name thread function: http://man7.org/linux/man-pages/man3/pthread_setname_np.3.html

How to display thread with names (for example firefox on POSIX):
ps H -C firefox -o 'pid tid cmd comm'

Back