diff options
| author | crupest <crupest@outlook.com> | 2021-06-10 11:35:29 +0800 | 
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2021-06-10 11:35:29 +0800 | 
| commit | f532667d936500f50447d63333544f603ec06137 (patch) | |
| tree | ab04f5afa2448e82baa82e409d5eb3fa6910a468 /works/life/operating-system-experiment/Thread.cpp | |
| parent | ef593ba2d445af515214d63bfd3942be9d673467 (diff) | |
| download | crupest-f532667d936500f50447d63333544f603ec06137.tar.gz crupest-f532667d936500f50447d63333544f603ec06137.tar.bz2 crupest-f532667d936500f50447d63333544f603ec06137.zip | |
import(life): ...
Diffstat (limited to 'works/life/operating-system-experiment/Thread.cpp')
| -rw-r--r-- | works/life/operating-system-experiment/Thread.cpp | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/works/life/operating-system-experiment/Thread.cpp b/works/life/operating-system-experiment/Thread.cpp index 7e3c784..a5f526d 100644 --- a/works/life/operating-system-experiment/Thread.cpp +++ b/works/life/operating-system-experiment/Thread.cpp @@ -112,7 +112,10 @@ void Thread::Destroy() noexcept {      joined_ = false;
  #ifdef CRU_WINDOWS
      thread_id_ = 0;
 -    thread_handle_ = nullptr;
 +    if (thread_handle_ != nullptr) {
 +      CloseHandle(thread_handle_);
 +      thread_handle_ = nullptr;
 +    }
  #else
      thread_ = nullptr;
  #endif
 | 
