mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-11 08:06:25 -04:00
Update spawned a goroutine per call that then sent on the user-events channel, so multiple Update calls from the same goroutine could be reordered by the scheduler — the doc comment even admitted "the order in which the user events will be handled is not guaranteed." That non-determinism is a latent source of flaky rendering: code that queues a model update and then a render in source order could see them run in the opposite order. Send on the channel directly instead, so same-goroutine calls arrive in source order. The send is non-blocking and panics on a full channel rather than blocking (a blocked send from the UI goroutine would deadlock against itself) or silently reordering; the buffer is sized generously so this is unreachable in normal use. UpdateAsync is now identical to Update and unused, so it's removed along with the shared updateAsyncAux helper. |
||
|---|---|---|
| .. | ||
| app | ||
| cheatsheet | ||
| commands | ||
| common | ||
| config | ||
| constants | ||
| env | ||
| fakes | ||
| gocui | ||
| gui | ||
| i18n | ||
| integration | ||
| jsonschema | ||
| logs | ||
| snake | ||
| tasks | ||
| theme | ||
| updates | ||
| utils | ||