Player::Append blocks thread in wasm
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- rust, wasm
調査の方向性
The reporter traces the deadlock to Player::append, which calls sleep_until_end, which blocks on std::sync::mpsc::Receiver::recv. Start by reading that call path and confirming the blocking happens only on the wasm target, where audio runs on the calling thread instead of a separate one. Done means append no longer blocks the single wasm thread, and the clear-then-append sequence from the report completes in a wasm build.
索引モデルが issue の本文から書いたものです。
説明
I try to do simple thing:
- Call
Player::clear()to stop current audio track - Immediately after that I call
Player::append()to play new track
if !player.empty() {
player.clear();
}
player.append(sound);
It works fine on linux/windows, but it deadlocks my app thread in WASM.
I have a guess why: inside append there is call to sleep_until_end. sleep_until_end does std::sync::mpsc::Receiver::recv inside of it. And recv blocks calling thread. It causes no issues in linux/windows, because rodio lives in separate thread. But in wasm we have single thread for all things and recv blocks it.
(playing sound on empty Player in WASM works fine)
- 主要言語
- Rust
- スター
- 2.5k
- フォーク
- 338
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RustAudio/rodio のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 73/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
-
WavDecoder::size_hint underflows (u32 wrap, ~4.29e9) after EOF, causes multi-GB Vec::collect() allocation対応中かも @marin-m が 2 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
RustAudio/rodio の issue をすべて見る
似ている issue
-
component:benchmark
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
agentic-os-org/ANOLISA#9177 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
oracle/rust-oracledb#61 ·
-
bug priority-medium to-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
Databricks tool-only response crashes in resolve_reasoning_and_content with KeyError: content対応中かも @1divyanshdev が今日担当しました。 オープンllm translation
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
BerriAI/litellm#48637 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信