Refine locking around pattern tree and in TermControl #13187

Open
opened 2026-01-31 03:36:09 +00:00 by claunia · 0 comments
Owner

Originally created by @DHowett on GitHub (Mar 25, 2021).

Originally assigned to: @lhecker on GitHub.

Yet more locking woes.

I wanted to introduce a write lock to ClearPatternTree, but it's being called from a place that already has the lock and a place that doesn't. Introducing the write lock in the place that doesn't requires a short-scoped lock. Updating the pattern tree, however, takes the lock.

This part of the code needs somebody to come through and reorganize it.

I was looking for a small, serviceable solution for 1.6 and 1.7, so I chose the easy one (a scoped lock around ClearPatternTree).

Originally created by @DHowett on GitHub (Mar 25, 2021). Originally assigned to: @lhecker on GitHub. Yet more locking woes. I wanted to introduce a write lock to ClearPatternTree, but it's being called from a place that already has the lock _and_ a place that doesn't. Introducing the write lock in the place that doesn't requires a short-scoped lock. Updating the pattern tree, however, takes the lock. This part of the code needs somebody to come through and reorganize it. I was looking for a small, serviceable solution for 1.6 and 1.7, so I chose the easy one (a scoped lock around ClearPatternTree).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13187