Skip to content

Commit 7685474

Browse files
committed
[bugfix] fix (std::min) compile error in win10 msvc use windows.h
1 parent f069515 commit 7685474

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/UtilsCtrl/ThreadPool/Thread/UThreadSecondary.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class UThreadSecondary : public UThreadBase {
107107
bool freeze() {
108108
if (likely(is_running_)) {
109109
cur_ttl_++;
110-
cur_ttl_ = std::min(cur_ttl_, config_->secondary_thread_ttl_);
110+
cur_ttl_ = (std::min)(cur_ttl_, config_->secondary_thread_ttl_);
111111
} else {
112112
cur_ttl_--; // 如果当前线程没有在执行,则ttl-1
113113
}

0 commit comments

Comments
 (0)