# gpui\(windows\): Move interior mutability down into fields \(\#44002\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/305e73ebbb2d178e0c0d09d940428c46f305f532)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 305e73ebbb2d178e0c0d09d940428c46f305f532

Requested commit: 305e73ebbb2d178e0c0d09d940428c46f305f532

Commit: 305e73ebbb2d178e0c0d09d940428c46f305f532

Tree: 6b63d72149be83b21c87e8104536ec4363f2a338

Author: Lukas Wirth

Committer: GitHub

## Message

```
gpui(windows): Move interior mutability down into fields (#44002)

Windows applications tend to be fairly re-entrant which does not work
well with our current top-level `RefCell` approach. We have worked
around a bunch of panics in the past due to this, but ultimately this
will re-occur (and still does according to sentry) in the future. So
this PR moves all interior mutability down to the fields.

Fixes ZED-1HM
Fixes ZED-3SH
Fixes ZED-1YV
Fixes ZED-29S
Fixes ZED-29X
Fixes ZED-369
Fixes ZED-20W

Release Notes:

- Fixed panics on windows caused by unexpected re-entrancy for interior
mutability
```

## Parents

- [ec6e7b84b8871ca0ef43075cf524b31dfb6f4e64](https://git.cafe/gitcafe/zed/commit/ec6e7b84b8871ca0ef43075cf524b31dfb6f4e64?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/305e73ebbb2d178e0c0d09d940428c46f305f532?format=markdown)
