# assistant_tool: Reduce locking in \`ToolWorkingSet\` \(\#26605\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e60e8f3a0aaf9263d772b27ecf90f1fe3f716a94

Requested commit: e60e8f3a0aaf9263d772b27ecf90f1fe3f716a94

Commit: e60e8f3a0aaf9263d772b27ecf90f1fe3f716a94

Tree: 5c58e4082537d47c19bca44b25399bc697a279f1

Author: Marshall Bowers

Committer: GitHub

## Message

```
assistant_tool: Reduce locking in `ToolWorkingSet` (#26605)

This PR updates the `ToolWorkingSet` to reduce the amount of locking we
need to do.

A number of the methods have had corresponding versions moved to the
`ToolWorkingSetState` so that we can take out the lock once and do a
number of operations without needing to continually acquire and release
the lock.

Release Notes:

- N/A
```

## Parents

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

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