ccls/src/work_thread.cc
Jacob Dufault 7939aec743 Remove WorkThread::Result.
WorkThread::StartThread is now a more typical main function.
2017-12-28 09:20:21 -08:00

12 lines
300 B
C++

#include "work_thread.h"
#include "platform.h"
// static
void WorkThread::StartThread(const std::string& thread_name,
std::function<void()> entry_point) {
new std::thread([thread_name, entry_point]() {
SetCurrentThreadName(thread_name);
entry_point();
});
}