mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01: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:
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user