Skip to content

Commit

Permalink
set zactor threadname for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
sphaero committed Jan 26, 2023
1 parent 95e24a0 commit e3b1786
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/zactor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down

0 comments on commit e3b1786

Please sign in to comment.