mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
changes to thread code (directly use boost::thread)
- removes our NewThread() function an replaces remaining calls with boost::thread with our TraceThread template - remove ExitThread() function - fix THREAD_PRIORITY_ABOVE_NORMAL for non Windows OSes
This commit is contained in:
parent
a2a2874fc0
commit
53e71135de
3 changed files with 5 additions and 27 deletions
12
src/util.cpp
12
src/util.cpp
|
|
@ -1468,15 +1468,3 @@ void RenameThread(const char* name)
|
|||
(void)name;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool NewThread(void(*pfn)(void*), void* parg)
|
||||
{
|
||||
try
|
||||
{
|
||||
boost::thread(pfn, parg); // thread detaches when out of scope
|
||||
} catch(boost::thread_resource_error &e) {
|
||||
printf("Error creating thread: %s\n", e.what());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue