mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 14:15:49 -06:00
fix frmStatus freeze
При закрытии одного из окон frmStatus приложение зависало.
This commit is contained in:
parent
40a2623647
commit
3bad8c07f3
2 changed files with 18 additions and 11 deletions
|
|
@ -630,8 +630,8 @@ frmStatus::~frmStatus()
|
|||
logThread->BreakRead();
|
||||
wxMilliSleep(50);
|
||||
logThread->DoTerminate();
|
||||
s_CloseLog.Wait();
|
||||
logThread = NULL;
|
||||
//s_CloseLog.Wait();
|
||||
while (logThread != NULL) wxMilliSleep(50) ;
|
||||
}
|
||||
if (logconn)
|
||||
{
|
||||
|
|
@ -2543,8 +2543,9 @@ void frmStatus::OnRefreshLogTimer(wxTimerEvent& event)
|
|||
logThread->BreakRead();
|
||||
wxMilliSleep(50);
|
||||
logThread->DoTerminate();
|
||||
s_CloseLog.Wait();
|
||||
logThread = NULL;
|
||||
wxMilliSleep(5);
|
||||
//s_CloseLog.Wait();
|
||||
while (logThread != NULL) wxMilliSleep(5);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -3537,7 +3538,8 @@ void frmStatus::OnLoadLogfile(wxCommandEvent& event)
|
|||
}
|
||||
}
|
||||
ReadLogThread::~ReadLogThread() {
|
||||
s_CloseLog.Post();
|
||||
//s_CloseLog.Post();
|
||||
((frmStatus *) theParent)->logThread = NULL;
|
||||
}
|
||||
void ReadLogThread::BreakRead() {
|
||||
if (!isReadyRows()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue