On 21 Apr 2014, at 05:44, "Lundberg, Johannes" <[email protected]> wrote:
> Hi > > Is each NSThread object backed by a pthread? Yes. > If so, would it be possible to have NSThread's setName also do > pthread_set_name_np(..., ...) > so that "top" etc also would show the thread name? > > I think I will try to do this anyway for my own debugging purposes. If you > like I can submit a patch later. That sounds like an excellent idea. The _np suffix in the function name (pthread_set_name_np) suggests that it's a non-standard addition to the pthreads API, so the presence/absence of the function would need to be tested at configure time in order to make such functionality portable to all the systems gnustrep runs on. I found this article which suggests it should work in some way for linux/bsd systems: http://stackoverflow.com/questions/2369738/can-i-set-the-name-of-a-thread-in-pthreads-linux and also this one for windows http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
