Skip to content

Can I use async and sync lock on same AsyncReaderWriterLock ? #441

Answered by timcassell
oruchreis asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @oruchreis, sorry I didn't see this until now (I usually get notifications on this repo, not sure why I didn't for this discussion).

Yes, AsyncReaderWriterLock is designed to work with both async and sync on the same instance. It's not really recommended due to deadlock issues, but if you know for a fact that the sync calls will only happen on their own thread, that's exactly the situation it was designed to support.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by oruchreis
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants