# windows: Better dispatcher \(\#11485\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 95e246ac1cab4df7b7718744e8c146679c8db128

Requested commit: 95e246ac1cab4df7b7718744e8c146679c8db128

Commit: 95e246ac1cab4df7b7718744e8c146679c8db128

Tree: afee162f6b588e0c1d5ccf169eca31c96ed771ae

Author: 张小白

Committer: GitHub

## Message

```
windows: Better dispatcher (#11485)

This PR leverages a more modern Windows API to implement
`WindowsDispatcher`, aligning its implementation more closely with that
of the `macOS` platform. The following improvements have been made:

1. Similar to `macOS`, there is no longer a need to use `sender` and
`receiver` to dispatch a `Runnable` on the main thread.
2. There is also no longer a need to use an `Event` for synchronization.
3. Consistent with #7506 and #11269, `Runnable` is now executed with
high priority.

However, this PR raises the minimum Windows version requirement of
`GPUI` to Windows 10, specifically Windows 10 Fall Creators Update
(10.0.16299). However, the `alacritty_terminal` dependency in Zed relies
on `conPTY` on Windows, an API introduced in the Windows 10 Fall
Creators Update. Therefore, the impact of this PR on Zed should be
minimal. I'd like to hear your voices about this PR, especially about
the minimum Windows version bumping.

Release Notes:

- N/A
```

## Parents

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

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