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

Make RW lock work recursively #114

Open
Duttenheim opened this issue Sep 15, 2022 · 0 comments
Open

Make RW lock work recursively #114

Duttenheim opened this issue Sep 15, 2022 · 0 comments
Assignees
Labels
bug Something isn't working category: foundation Containers, math, network implementation, threading and synchronisation, etc

Comments

@Duttenheim
Copy link
Contributor

Currently, the RW locks might not work recursively for some platforms. For example, The SRWLOCK in Win32 doesn't allow for reentrant acquiring of the lock even if on the same thread, and will cause a deadlock.

This should be implemented for all platforms.

One suggested method is to use thread local counters and only perform the lock and unlock when the counter is 0, but always increment the counter.

@Duttenheim Duttenheim added bug Something isn't working category: foundation Containers, math, network implementation, threading and synchronisation, etc labels Sep 15, 2022
@Duttenheim Duttenheim self-assigned this Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working category: foundation Containers, math, network implementation, threading and synchronisation, etc
Projects
None yet
Development

No branches or pull requests

1 participant