MCPcopy Create free account
hub / github.com/davisking/dlib / get_thread_name

Method get_thread_name

dlib/logger/logger_kernel_1.cpp:365–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363// ----------------------------------------------------------------------------------------
364
365 uint64 logger::global_data::
366 get_thread_name (
367 )
368 {
369 thread_id_type id = get_thread_id();
370 uint64 thread_name;
371 if (thread_names.is_in_domain(id))
372 {
373 thread_name = thread_names[id];
374 }
375 else
376 {
377 if (is_dlib_thread(id))
378 register_thread_end_handler(*this,&global_data::thread_end_handler);
379 thread_name = next_thread_name;
380 thread_names.add(id,thread_name);
381 thread_name = next_thread_name;
382 ++next_thread_name;
383 }
384 return thread_name;
385 }
386
387// ----------------------------------------------------------------------------------------
388// ----------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 4

is_dlib_threadFunction · 0.85
get_thread_idFunction · 0.50
addMethod · 0.45

Tested by

no test coverage detected