From e3b1786259c54b24c2749a01fbe78b7d276164d4 Mon Sep 17 00:00:00 2001 From: Arnaud Loonstra Date: Thu, 26 Jan 2023 14:58:19 +0100 Subject: [PATCH] set zactor threadname for convenience --- src/zactor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/zactor.c b/src/zactor.c index 5e4f92926..44437e033 100644 --- a/src/zactor.c +++ b/src/zactor.c @@ -123,6 +123,11 @@ zactor_new (zactor_fn actor, void *args) #if defined (__UNIX__) pthread_t thread; pthread_create (&thread, NULL, s_thread_shim, shim); +#if defined (__UTYPE_OSX) + pthread_setname_np("ZACTOR"); +#else + pthread_setname_np(thread, "ZACTOR"); +#endif pthread_detach (thread); #elif defined (__WINDOWS__)