mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-04 20:51:27 +02:00
Rename util.h Sleep --> MilliSleep
Two reasons for this change: 1. Need to always use boost::thread's sleep, even on Windows, so the sleeps can be interrupted (prior code used Windows' built-in Sleep). 2. I always forgot what units the old Sleep took.
This commit is contained in:
10
src/init.cpp
10
src/init.cpp
@ -43,7 +43,7 @@ enum BindFlags {
|
||||
void ExitTimeout(void* parg)
|
||||
{
|
||||
#ifdef WIN32
|
||||
Sleep(5000);
|
||||
MilliSleep(5000);
|
||||
ExitProcess(0);
|
||||
#endif
|
||||
}
|
||||
@ -105,7 +105,7 @@ void Shutdown(void* parg)
|
||||
UnregisterWallet(pwalletMain);
|
||||
delete pwalletMain;
|
||||
NewThread(ExitTimeout, NULL);
|
||||
Sleep(50);
|
||||
MilliSleep(50);
|
||||
printf("Bitcoin exited\n\n");
|
||||
fExit = true;
|
||||
#ifndef QT_GUI
|
||||
@ -116,8 +116,8 @@ void Shutdown(void* parg)
|
||||
else
|
||||
{
|
||||
while (!fExit)
|
||||
Sleep(500);
|
||||
Sleep(100);
|
||||
MilliSleep(500);
|
||||
MilliSleep(100);
|
||||
ExitThread(0);
|
||||
}
|
||||
}
|
||||
@ -1061,7 +1061,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
// Loop until process is exit()ed from shutdown() function,
|
||||
// called from ThreadRPCServer thread when a "stop" command is received.
|
||||
while (1)
|
||||
Sleep(5000);
|
||||
MilliSleep(5000);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user