Author bra
Recipients bra
Date 2012-07-30.12:19:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343650770.87.0.181202709436.issue15500@psf.upfronthosting.co.za>
In-reply-to
Content
Python class Thread has a "name" argument, which sets the name of the given thread. This name is used only internally, while there is a possibility to set this on an OS-level.
Related discussion:
http://stackoverflow.com/questions/2369738/can-i-set-the-name-of-a-thread-in-pthreads-linux

#include <pthread.h>
int pthread_setname_np(pthread_t thread, const char *name);

// FreeBSD & OpenBSD: function name is slightly different
void pthread_set_name_np(pthread_t tid, const char *name);

// Mac OS X: it only seems applicable to the current thread (no thread ID)
int pthread_setname_np(const char*);

It would be very useful if Python set the name parameter with the above pthread calls, so the user/developer could see which threads do what in ps or top.
History
Date User Action Args
2012-07-30 12:19:30brasetrecipients: + bra
2012-07-30 12:19:30brasetmessageid: <1343650770.87.0.181202709436.issue15500@psf.upfronthosting.co.za>
2012-07-30 12:19:30bralinkissue15500 messages
2012-07-30 12:19:30bracreate