emscripten-core / emscripten-core/emscripten

SINGLE_FILE and pthread incompatibility

オープン
#17,547 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
27.6k
フォーク
3.6k
平均マージ
1日 16時間
マージ済み PR(30日)
117

説明

According to https://github.com/emscripten-core/emscripten/pull/12833#issue-746884561 which says the following:

> SINGLE_FILE=1 is not supported with Wasm Workers (like it is not supported with pthreads)

I'm unable to find other specific documentation for pthreads not supporting SINGLE_FILE, but locally I can confirm that removing SINGLE_FILE does indeed fix the threading issue I'm running into (where the thread does not get executed with `detach`).

What is the specific reason(s) that SINGLE_FILE does not work with pthreads? From what I understand about SINGLE_FILE, it adds the contents of the .js and .wasm files (as a Base64 string) into the HTML file as opposed to reading the wasm contents via locateFile - clearly there is something else that I'm missing.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、リンクされている Emscripten のプルリクエストを読み、SINGLE_FILE=1 の有無による報告済みの pthreads の動作を比較します。関連する Emscripten のエントリポイントで、SINGLE_FILE、locateFile、Wasm Workers がどのように連携するかを追跡します。SINGLE_FILE が pthreads と互換性を持たない具体的な理由を文書化し、サポートされる構成を明確にできれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
wasm
領域
build-system, compilers
issue の種類
ドキュメント
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。