5#ifndef __UTIL_THREAD_H__
6#define __UTIL_THREAD_H__
8#include <condition_variable>
11#include <system_error>
23#include <tbb/spin_mutex.h>
39 thread(function<
void()> run_cb);
42 static void *
run(
void *arg);
47#if defined(__APPLE__) || defined(__linux__) && !defined(__GLIBC__)
~thread_scoped_spin_lock()
thread_scoped_spin_lock(thread_spin_lock &lock)
static void * run(void *arg)
function< void()> run_cb_
thread(function< void()> run_cb)
#define CCL_NAMESPACE_END
std::unique_lock< std::mutex > thread_scoped_lock
CCL_NAMESPACE_BEGIN typedef std::mutex thread_mutex
tbb::spin_mutex thread_spin_lock
std::condition_variable thread_condition_variable