Does Thread 1 and 2 block each other when one of them is entered write lock?
","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"No, it's not possible. They are irrelevant.
","upvoteCount":1,"url":"https://GitHub.com/dotnet/dotNext/discussions/237#discussioncomment-9583644"}}}-
Hi, private static readonly AsyncReaderWriterLock _rwlock = new();
//Thread:1
using (await _rwlock.AcquireWriteLockAsync(token))
{}
//Thread:2
using (_rwlock.AcquireUpgradeableReadLock())
{
using(_rwlock.AcquireWriteLock())
{}
} Does Thread 1 and 2 block each other when one of them is entered write lock? |
Beta Was this translation helpful? Give feedback.
-
No, it's not possible. They are irrelevant. |
Beta Was this translation helpful? Give feedback.
No, it's not possible. They are irrelevant.