MichaEiler / libazul

C++ Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Thank you!

emeakyl opened this issue · comments

I am just writing these words to say thank you for having libazul on github!

I was in a hurry and my code had an issue that needed portable inter-process synchronizations... I found your comment on stackoverflow (https://stackoverflow.com/questions/6895758/inter-process-condition-variables-in-windows/48295773#48295773) and after a bit of investigation, found your code here - it was really helpful to me!

Thanks again!

Awesome! Glad to hear that I could help out :)!

Personally I was using a similar implementation on a few thousand embedded devices running on Windows 10 without any issues for a few years now. The Linux implementation should also work but hasn't been tested in a production environment yet.

I don't expect to go up to these numbers, but that's good to read.

For the record, the only think I found tricky (but easy to solve!) was that NotifyOne() complains if the waiting thread queue is empty... but not NotifyAll(); in the end, I used NotifyAll(), even if I knew that in the "worst" case I have only 1 waiting thread.

Thanks for finding the issue! You're of course right, there should have been a check for the threadQueue size. Funny enough when implementing the macOS variant, I put the check there. Only the Windows build had this issue.

I comited the fix including a new unit test here:
af9ec79