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

https://yyu-nim.github.io/actix/rust/crossbeam/shardedlock/2022/08/15/crossbeam-shardedlock.html #8

Open
utterances-bot opened this issue Aug 16, 2022 · 1 comment

Comments

@utterances-bot
Copy link

crossbeam <4> - sharded lock | Production-ready Rust Libraries (PRL)

State machine을 구현하다 보면, 이런 경우에 고민이 될 수 있다: “State A 에서 State B로 전환을 해야 하는데, State A에서 외부 Event가 들어오지 않도록 잠깐 막고 싶다”.

https://yyu-nim.github.io/actix/rust/crossbeam/shardedlock/2022/08/15/crossbeam-shardedlock.html

Copy link

Writer lock이 획득된 상태에서, lock owner thread가 panic으로 죽게 되면, 그 lock의 상태는 poisoned로 정의되고, read() 호출의 결과로 Error가 리턴되므로, 이에 대한 처리가 필요하다.
=> 이런거 진짜 좋은 것 같아요! cpp에서 쓰던 rw lock을 생각한다면 여긴 신세계네요 ㅎㅎ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants