# gpui: Expose threaded dispatcher for tests \(\#62096\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8886dcb0d4ea0e145e4512d415d3260602eca99f

Requested commit: 8886dcb0d4ea0e145e4512d415d3260602eca99f

Commit: 8886dcb0d4ea0e145e4512d415d3260602eca99f

Tree: 74a88ee937d5a27cc25f5e73355d6a4f14b81745

Author: Nathan Sobo

Committer: GitHub

## Message

```
gpui: Expose threaded dispatcher for tests (#62096)

Some tests need real OS threading and timers rather than the
deterministic, single-threaded behavior of `TestDispatcher`. The
existing multithreaded dispatcher provides those production-like
scheduling semantics, but it is named and gated as a benchmark-only
facility, which unnecessarily pulls in Criterion and histogram
dependencies.

This renames `BenchDispatcher` to `ThreadedDispatcher` and exposes it
through GPUI's `test-support` feature. Benchmark contexts continue using
the same dispatcher, while Criterion and benchmark reporting remain
isolated behind the `bench` feature.

### Testing

- `cargo check -p gpui --features test-support`
- `cargo check -p gpui --features bench`
- `cargo nextest run -p gpui 'threaded_dispatcher::tests'`
- `cargo fmt --all --check`

Release Notes:

- N/A
```

## Parents

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

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