18 #ifndef _LOG4CXX_THREADUTILITY_H 19 #define _LOG4CXX_THREADUTILITY_H 46 typedef std::function<void(
LogString threadName,
47 std::thread::id threadId,
75 std::unique_ptr<priv_data> m_priv;
80 static std::shared_ptr<ThreadUtility> instance();
93 void configureFuncs( ThreadStartPre pre_start,
94 ThreadStarted started,
95 ThreadStartPost post_start );
102 void preThreadBlockSignals();
108 void threadStartedNameThread(
LogString threadName,
109 std::thread::id thread_id,
110 std::thread::native_handle_type native_handle);
117 void postThreadUnblockSignals();
122 template<
class Function,
class... Args>
133 std::thread t( f, args... );
ThreadConfigurationType
Definition: threadutility.h:56
LOG4CXX_PTR_DEF(AppenderAttachableImpl)
std::thread createThread(LogString name, Function &&f, Args &&... args)
Start a thread.
Definition: threadutility.h:123
std::function< void(LogString threadName, std::thread::id threadId, std::thread::native_handle_type nativeHandle)> ThreadStarted
Called when a new thread has started.
Definition: threadutility.h:48
std::function< void()> ThreadStartPre
A function that will be called before a thread is started.
Definition: threadutility.h:35
Definition: threadutility.h:66
std::function< void()> ThreadStartPost
Called after a thread has started.
Definition: threadutility.h:54
Definition: appender.h:32
std::basic_string< logchar > LogString
Definition: logstring.h:66