Skip to content

Commit

Permalink
Fix the thread handle that arrives too late
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Sep 17, 2023
1 parent 1e2c1d6 commit be89bf6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/xtd.core/src/xtd/threading/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ bool thread::join_all_ptr(const std::vector<thread*>& threads, int32 millisecond

void thread::thread_proc() {
if (data_->thread_id == invalid_thread_id) data_->thread_id = get_current_thread_id();
if (data_->handle == invalid_handle) data_->handle = get_current_thread_handle();
if (!data_->name.empty()) native::thread::set_current_thread_name(data_->name);
if (data_->priority != xtd::threading::thread_priority::normal) native::thread::set_priority(data_->handle, as<int32>(data_->priority));

Expand Down

0 comments on commit be89bf6

Please sign in to comment.