thisKai / rust-windows-dll

Macro for dynamically loading windows dll functions
MIT License
19 stars 6 forks source link

fix: fix race condition in DllCache #8

Closed vthib closed 2 years ago

vthib commented 2 years ago

See description of the race condition in the associated ticket.

Closes #7

thisKai commented 2 years ago

Thanks! Sorry for the wait, I only just got internet in my new house. I'll merge this now but I'd like to write an automated test against this when I have time. Do you have an example of code that causes this kind of data race?

vthib commented 2 years ago

I tried to write a test for it but didn't really managed to have one working. We had the crash on startup of a complex multithread program, with multiple threads probably calling into windows-dll at around the same time.