Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议 hmutex.h 添加 try #612

Open
baidwwy opened this issue Aug 24, 2024 · 3 comments
Open

建议 hmutex.h 添加 try #612

baidwwy opened this issue Aug 24, 2024 · 3 comments

Comments

@baidwwy
Copy link

baidwwy commented Aug 24, 2024

建议 hmutex.h 添加 try

@ithewei
Copy link
Owner

ithewei commented Aug 26, 2024

需要的话你提PR吧

@baidwwy
Copy link
Author

baidwwy commented Aug 26, 2024

#define hmutex_trylock          TryEnterCriticalSection

#define hmutex_trylock(pmutex) (pthread_mutex_trylock(pmutex) == 0)

#define hsem_trywait(psem)          hsem_wait_for(psem, 0) 

我也想写
水平不够 -_-!

@ithewei
Copy link
Owner

ithewei commented Aug 27, 2024

这不是写的挺好吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants