On Wed, May 1, 2019 at 7:50 PM Anonymouse via Digitalmars-d-learn
wrote:
>
> Is there a way of setting the process/thread name that's neater
> than this?
>
> import core.sys.posix.pthread;
>
> extern(C) int pthread_setname_np(pthread_t, const char*);
>
> void main()
> {
> import std.string :
Is there a way of setting the process/thread name that's neater
than this?
import core.sys.posix.pthread;
extern(C) int pthread_setname_np(pthread_t, const char*);
void main()
{
import std.string : toStringz;
pthread_setname_np(pthread_self(), toStringz("thread_name"));
// ...
}
I