Skip to content

Commit 7b29998

Browse files
committed
Added conditional compilation for SetThreadDescription
Older versions of Windows don't support SetThreadDescription. When building an ACE library that needs to be compatible with these, set ACE_LACKS_SETTHREADDESCRIPTION in config.h. This can't be determined from the Windows headers which include SetThreadDescription unconditionally.
1 parent 509f4be commit 7b29998

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ACE/ace/OS_NS_Thread.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4113,10 +4113,12 @@ ACE_OS::thr_create (ACE_THR_FUNC func,
41134113
flags,
41144114
thr_id);
41154115

4116+
# ifndef ACE_LACKS_SETTHREADDESCRIPTION
41164117
if (thr_name && *thr_name && *thr_handle)
41174118
{
41184119
SetThreadDescription (*thr_handle, ACE_Ascii_To_Wide (*thr_name).wchar_rep ());
41194120
}
4121+
# endif
41204122

41214123
if (priority != ACE_DEFAULT_THREAD_PRIORITY && *thr_handle != 0)
41224124
{

0 commit comments

Comments
 (0)