Wait until deadline variant
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- wasm
調査の方向性
issue ではファイルやテストは指定されていません。まず依存関係である #230 を読み、続いて Atomics.waitAsync と、さまざまなオペレーティングシステムおよび組み込みハードウェアにおける絶対待機と相対待機についての提案の議論を確認してください。完了時には、明確なセマンティクスと、既存の期間ベースの形式との関係を備えた、期限ベースの待機バリアントが仕様化されているべきです。
索引モデルが issue の本文から書いたものです。
説明
This obviously depends on #230.
Waiting for a duration is useful for simple blocking waits, but event loops generally find deadlines more convenient to work with, since you can just throw all the deadlines into a heap, sort by deadline, and (if your loop is multi-threaded) make your wait condition include timer add/remove events. Browser runtimes would already likely need a similar model anyways because of Atomics.waitAsync, but it's easy for a runtime using one model to expose the other.
Also, the type of wait differs heavily between platforms, with some accepting absolute deadlines, some accepting relative timeouts, and some accepting both:
- Operating systems:
- Linux: all futex waits other than
FUTEX_WAITuse absolute deadlines, and even that one has an absolute alternative documented in its manpages. - Fuschia only uses absolute deadlines in its
zx_futex_waitsyscall, and offers no relative equivalent. - macOS provides both
os_sync_wait_on_address_with_deadlineandos_sync_wait_on_address_with_timeout. - OpenBSD and Windows only offer relative timeouts in their APIs.
pthread_condvar_timedwaitonly uses absolute timeouts.
- Linux: all futex waits other than
- Embedded hardware:
- 32-bit ARM's SysTick is effectively timeout-based. It decrements every tick until it hits zero, in which it then triggers an interrupt. Setting the register essentially sets the number of ticks to wait before sending the interrupt.
- RISC-V's privileged spec uses
*timecmpregisters corresponding to*timetargets and triggers an interrupt whenever they're equal, effectively using a deadline-based system. - x86-64's HPET works nearly identically to RISC-V's mechanism. (This mostly only has relevance for VM-based server-side runtimes.)
- The real-time clock specified by ACPI for motherboards uses deadlines. (This is sometimes used on high-end microcontrollers.)
Will note that it's easy to do one in terms of the other.
- If all waits are absolute, relative waits are as simple as using a deadline of
current_time() + timeout. - If all waits are relative, absolute waits are as simple as using a timeout of
max(target_time - current_time(), 0).
- 主要言語
- 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
-
agent:Windows bug MEDIUM windows
難易度 2/5 半日 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
MagnaCapax/PMSS#1006 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
FluidNumerics/fluid-walk-blocker#138 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
AcademySoftwareFoundation/openexr#2701 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Console.printHexオープンgood first issue kernel
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
JackFurton/who-would-build-a-kernel-in-java#33 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信