Files
zig/lib/std
r00ster91 0b2ee09378 std.Thread.setName: use unused code
I noticed a comment saying that the intent of a code's author was unclear.
What happened is that the author forgot to put the check for whether the
thread is the calling thread (`self.getHandle() ==
std.c.pthread_self()`) in the `if (use_pthreads)`.
If the thread is the calling thread, we use `prctl` to set or get the
thread's name and it does not take a thread id because it knows the id
of the thread we're calling `getName` or `setName` from.
I have found a source saying that using `pthread_setname_np` on either the calling thread
or any other thread by thread id would work too (so we don't need to
call `prctl`) but I was not sure if that is the case on all systems
so we keep using `pthread_setname_np` if we have a
specific thread that is not the thread we're calling from, and `prctl`
otherwise.
2023-02-24 20:03:40 +01:00
..
2022-12-13 13:14:20 +02:00
2022-11-04 00:09:27 +03:30
2023-02-18 19:17:21 -07:00
2023-02-14 02:17:33 +02:00
2022-12-13 13:14:20 +02:00
2023-02-21 00:27:12 -05:00
2023-02-20 09:09:05 +11:00
2023-01-11 15:39:48 -08:00
2022-09-11 23:18:43 -04:00
2023-02-17 09:08:41 -07:00
2023-02-24 20:03:40 +01:00
2022-04-15 17:01:01 -05:00
2023-01-06 18:52:39 -07:00
2023-02-03 00:06:11 -07:00