# Fix panic when using RealtimeAudio priority \(\#46635\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 816e5f5c7358bc2410ae1c7d3473ee43ce2ef92b

Requested commit: 816e5f5c7358bc2410ae1c7d3473ee43ce2ef92b

Commit: 816e5f5c7358bc2410ae1c7d3473ee43ce2ef92b

Tree: c889b434eda1e1f009fc9d993e233040867e22dc

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Fix panic when using RealtimeAudio priority (#46635)

The scheduler integration (#44810) removed the special handling for
realtime audio tasks that spawn them on a dedicated thread. This caused
a panic in the Mac dispatcher when RealtimeAudio priority was passed to
the regular dispatch path.

This restores the original behavior: RealtimeAudio tasks are spawned on
a dedicated thread via dispatcher.spawn_realtime(), using a bounded
channel to send runnables to it.

Release Notes:

- N/A
```

## Parents

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

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