How to cancel a pending Atomics.waitAsync?
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, wasm
調査の方向性
まず、issue に記載されている Atomics.waitAsync API の動作と WebAssembly threads proposal のコンテキストを読んでください。非同期の待機にキャンセルまたはガベージコレクションの保証があるかどうかを確認し、安全なデイニシャライゼーションを提供するために必要なサポート対象の動作または設計を文書化してください。
索引モデルが issue の本文から書いたものです。
説明
In several scenarios, after having issued a Atomics.waitAsync(...).value.then((value) => { /* do something */ }); operation, it can happen that some kind of resource/application/page deinitialization type of activity occurs, which deinitializes parts of the Wasm app that contain e.g. the data structures for, say, a lock, semaphore or other multithreading synchronization primitive that resided at that address.
How would one ensure that if such application deinitialization does take place before the waitAsync.then() handler has been invoked, that the promise handler would never be fired (and /* do something */ should never get executed)?
At application level, I can use a separate JavaScript variable
var lockStillExists = true;
void deleteLock() {
lockStillExists = false;
}
...
Atomics.waitAsync(myInt32Array, ...).value.then((value) => { if (lockStillExists) { /* do something */ } })
to ensure that /* do something */ will never erroneously execute in case the wasm app deinitializes in between, but what happens if I want to deinitialize and let myInt32Array or other JS variables garbage collect altogether? I.e. the promise callback function (value) => { ... } will capture a scope, that would surely pin down myInt32Array and other JS vars in the scope to remain alive indefinitely (since the .then() will never resolve)?
Is there a way to cancel an async wait and/or guarantee that JS garbage collection will safely occur?
- 主要言語
- WebAssembly
- スター
- 769
- フォーク
- 54
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WebAssembly/threads のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
WebAssembly/threads#254 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
WebAssembly/threads#253 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
WebAssembly/threads#245 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
WebAssembly/threads#240 ·
-
Branch renamingオープン
難易度 1/5 1時間未満 初心者へのやさしさ 20/100
WebAssembly/threads#237 ·
WebAssembly/threads の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
modelcontextprotocol/python-sdk#3648 ·
メンテナーはふだん 1 日以内に返信
-
bot:ai-assisted status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
midnightntwrk/midnight-js#1424 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
EclipseFdn/open-vsx.org#13830 ·
メンテナーはふだん 1 日以内に返信
-
Make branch and label autocomplete matching locale-independent対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
jenkinsci/gitlab-plugin#1950 ·