# Use Tokio::spawn instead of getting an executor handle \(\#36701\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 1b2ceae7efb2b871d19025582cabc4619eee1bdc

Requested commit: 1b2ceae7efb2b871d19025582cabc4619eee1bdc

Commit: 1b2ceae7efb2b871d19025582cabc4619eee1bdc

Tree: 5f9c64a9c0232292fd0f035af2c1d5172f224dfe

Author: Julia Ryan

Committer: GitHub

## Message

```
Use Tokio::spawn instead of getting an executor handle (#36701)

This was causing panics due to the handles being dropped out of order.
It doesn't seem possible to guarantee the correct drop ordering given
that we're holding them over await points, so lets just spawn on the
tokio executor itself which gives us access to the state we needed those
handles for in the first place.

Fixes: ZED-1R

Release Notes:

- N/A

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
```

## Parents

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

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