Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rbmm
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
rbmm
3y ago
yes. after any thread request exclusive access to lock, the sequential shared acquire request will block. this iswell known fact, i hope. this is example when shared request will be blocked, despite shared owner(s) now inside lock also look
2.
▲
by
rbmm
3y ago
of course - SRW lock allow shared access only if no waiters ( request to exclusive access) on lock. so even if lock in shared mode, new shared request can block, if was waiter(exclusive) already. in case OP no exactly this, but anyway - i
3.
▲
by
rbmm
3y ago
"other threads can share-acquire the same lock without waiting." can but not always and mandatory. you really allow to system enter another shared requestor. but only allow,not demand. system not let shared requestor enter to lock
4.
▲
by
rbmm
3y ago
what is shared mode ? this is by fact optimization for speed, if we need read-only access to data, we allow to system let another thread into the section that requests shared access also allow but NOT DEMAND this. If one thread has acquired
5.
▲
by
rbmm
3y ago
yes, this is i (that "rbmm"), #opentowork
6.
▲
by
rbmm
3y ago
https://github.com/rbmm/SRW-2 - possible better repro code . where i guarantee repro this without hundreds loops. i be say that "question" in RtlReleaseSRWLockExclusive implementation. it first remove Lock bi
7.
▲
by
rbmm
3y ago
several years ago i do own implementation of SRW/PushLocks - of course based on original NeillC code.. https://github.com/rbmm/SRW_ALT/tree/main/PushLock-ALT they have slightly worse performance com