开发者

WinAPI timed mutex lock

开发者 https://www.devze.com 2023-02-05 05:08 出处:网络
How to lock mutex (critical section) for some amount of time? Is there any API function for 开发者_如何学编程that? As far as I see there is nothing like that in windows. If so, is it possible to imple

How to lock mutex (critical section) for some amount of time? Is there any API function for 开发者_如何学编程that? As far as I see there is nothing like that in windows. If so, is it possible to implement it manualy?

Thanks.


The equivalent of pthread_mutex_timedlock() in Win32 is using a Mutex and specifying a timeout (other than INFINITE) in one of the wait-functions.

0

精彩评论

暂无评论...
验证码 换一张
取 消