Subject: Re: [boost] [thread] API for getting/setting thread name in Boost?
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2016-05-10 02:35:05
Le 10/05/2016 Ã 01:57, Bob Summerwill a Ã©crit :
> Issue logged as https://github.com/boostorg/thread/issues/84. Thanks!
What I have in mind was to use the boost::thread_attributes, but we are
unable to do it in OSX as the set name in OSX sets the name of the
current thread :(
After some thought I believe we could do it by using a trampoline that
will do the setting before calling the user main thread function, but
this is more complex and needs to store the name in the thread_data context.
IIUC, what you are proposing and the single thing that could be done in
an almost portable way and easily is to define two non-member functions
to set and get the thread name on namespace this_thread or any other. Is
this what you are proposing? If this is the case, this functionality can
be developed completely independently of Boost.Thread, isn't' it?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk