critical_section::try_lock_for 方法
嘗試取得鎖定,而不封鎖以特定數目的毫秒數。
bool try_lock_for(
unsigned int _Timeout
);
參數
- _Timeout
在逾時前要等候的毫秒數。
傳回值
如果已取得鎖定,會產生值 true,否則會產生 false。
需求
標頭: concrt.h
**命名空間:**concurrency
嘗試取得鎖定,而不封鎖以特定數目的毫秒數。
bool try_lock_for(
unsigned int _Timeout
);
如果已取得鎖定,會產生值 true,否則會產生 false。
標頭: concrt.h
**命名空間:**concurrency