New submission from Attila Nagy: 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. ---------- components: Library (Lib) messages: 166890 nosy: bra priority: normal severity: normal status: open title: Python should support naming threads type: enhancement versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15500> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com