Be defensive against reentry on macOS
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 9.7k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
In the druid-shell mac backend, we are currently very cavalier about casting the `ViewState` to `&mut ViewState`. It would be better if instead we stored something like a `RefCell`, and then to get a mutable reference had to go through the `borrow_mut` dance.
This is motivated by [discussion in zulip](https://xi.zulipchat.com/#narrow/stream/147926-druid/topic/druid-chatter/near/179954557), around #262.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the druid-shell mac backend and inspect the ViewState casting described in the issue, then review the linked discussion around #262 for the reentry motivation. Evaluate storing ViewState in a RefCell and using borrow_mut for mutable access; done means the backend no longer relies on the current direct mutable cast and reentry is handled defensively.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100