# language: Fix reparse timeout not actually working \(\#45347\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ccce05d25cef856746103a25d909a22456e6e6c0

Requested commit: ccce05d25cef856746103a25d909a22456e6e6c0

Commit: ccce05d25cef856746103a25d909a22456e6e6c0

Tree: 09c39d979603ea997cbd5d71a6b2e54cb51fe4aa

Author: Lukas Wirth

Committer: GitHub

## Message

```
language: Fix reparse timeout not actually working (#45347)

We use `block_with_timeout` to give the reparse task a millisecond to
complete, and if it takes longer we put the work off to the background.
The reason for this is that we want tree-sitter based features to feel
snappy.
The reparse task is non-cooperative though, it has no yield points,
giving us no place to actually check for our timeout, meaning we will
always drive it to completion and block for the entire duration.
This kicks out the `block_with_timeout` in favor of using the treesitter
progress callback to handle timeouts instead.

Release Notes:

- Improved responsiveness with very language language files on edits
```

## Parents

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

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