Skip to content

Commit

Permalink
wait all
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Mar 31, 2024
1 parent 4197a5e commit ba3fee9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions XG_CancelGenBlacksDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class XG_CancelGenBlacksDialog : public XG_Dialog
::EnterCriticalSection(&xg_csLock);
xg_bCancelled = true;
::LeaveCriticalSection(&xg_csLock);
// スレッドを待つ。
XgWaitForThreads();
// スレッドを閉じる。
XgCloseThreads();
Expand Down
1 change: 1 addition & 0 deletions XG_CancelSmartSolveDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class XG_CancelSmartSolveDialog : public XG_Dialog
::EnterCriticalSection(&xg_csLock);
xg_bCancelled = true;
::LeaveCriticalSection(&xg_csLock);
// スレッドを待つ。
XgWaitForThreads();
// スレッドを閉じる。
XgCloseThreads();
Expand Down
2 changes: 2 additions & 0 deletions XG_CancelSolveDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class XG_CancelSolveDialog : public XG_Dialog
::EnterCriticalSection(&xg_csLock);
xg_bCancelled = true;
::LeaveCriticalSection(&xg_csLock);
// スレッドを待つ。
XgWaitForThreads();
// スレッドを閉じる。
XgCloseThreads();
Expand All @@ -45,6 +46,7 @@ class XG_CancelSolveDialog : public XG_Dialog
::EnterCriticalSection(&xg_csLock);
xg_bCancelled = true;
::LeaveCriticalSection(&xg_csLock);
// スレッドを待つ。
XgWaitForThreads();
// スレッドを閉じる。
XgCloseThreads();
Expand Down
1 change: 1 addition & 0 deletions XG_CancelSolveNoAddBlackDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class XG_CancelSolveNoAddBlackDialog : public XG_Dialog
::EnterCriticalSection(&xg_csLock);
xg_bCancelled = true;
::LeaveCriticalSection(&xg_csLock);
// スレッドを待つ。
XgWaitForThreads();
// スレッドを閉じる。
XgCloseThreads();
Expand Down
2 changes: 1 addition & 1 deletion XWordGiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8002,7 +8002,7 @@ void __fastcall XgCloseThreads(void) noexcept
// スレッドを待つ。
void __fastcall XgWaitForThreads(void) noexcept
{
::WaitForMultipleObjects(xg_dwThreadCount, xg_ahThreads.data(), true, 1000);
::WaitForMultipleObjects(xg_dwThreadCount, xg_ahThreads.data(), TRUE, INFINITE);
}

// スレッドが終了したか?
Expand Down

0 comments on commit ba3fee9

Please sign in to comment.