MCPcopy Create free account
hub / github.com/Icinga/icinga2 / IsWorkerThread

Method IsWorkerThread

lib/base/workqueue.cpp:135–143  ·  view source on GitHub ↗

* Checks whether the calling thread is one of the worker threads * for this work queue. * * @returns true if called from one of the worker threads, false otherwise */

Source from the content-addressed store, hash-verified

133 * @returns true if called from one of the worker threads, false otherwise
134 */
135bool WorkQueue::IsWorkerThread() const
136{
137 WorkQueue **pwq = l_ThreadWorkQueue.get();
138
139 if (!pwq)
140 return false;
141
142 return *pwq == this;
143}
144
145void WorkQueue::SetExceptionCallback(const ExceptionCallback& callback)
146{

Callers 7

AssertOnWorkQueueMethod · 0.80
AssertOnWorkQueueMethod · 0.80
AssertOnWorkQueueMethod · 0.80
AssertOnWorkQueueMethod · 0.80
AssertOnWorkQueueMethod · 0.80
AssertOnWorkQueueMethod · 0.80
AssertOnWorkQueueMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected