mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 17:41:58 +00:00
7939aec743
WorkThread::StartThread is now a more typical main function.
12 lines
300 B
C++
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();
|
|
});
|
|
} |