threads icon indicating copy to clipboard operation
threads copied to clipboard

A WebAssbembly Thread should interoperate with a tasklet efficiently.

Open winksaville opened this issue 8 years ago • 5 comments

Going farther it might be deseriable that a tasklet be indistinguisable from a WebAssembly Thread.

winksaville avatar Jun 26 '17 21:06 winksaville

Going farther it might be deseriable that a tasklet be indistinguisable from a WebAssembly Thread.

How is that going to be possible? The tasklet proposal says that Atomics.wait() in a tasklet must throw TypeError (technically, its [[CanBlock]] property is set to false).

lars-t-hansen avatar Jun 27 '17 13:06 lars-t-hansen

I'm suggesting that the people working on WebAssembly threads and tasklets communicate with each other so that incompatibilities can be worked out early in each other's development cycle. As development seems to be proceeding simultaneously for both.

Something like a weekly meeting and sharing of documents or ...

On Tue, Jun 27, 2017, 6:08 AM Lars T Hansen [email protected] wrote:

Going farther it might be deseriable that a tasklet be indistinguisable from a WebAssembly Thread.

How is that going to be possible? The tasklet proposal says that Atomics.wait() in a tasklet must throw TypeError (technically, its [[CanBlock]] property is set to false).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WebAssembly/threads/issues/39#issuecomment-311352635, or mute the thread https://github.com/notifications/unsubscribe-auth/AA-hHKB-u-pkj-xI5xXr9-MQghN2Vpukks5sIP62gaJpZM4OF45h .

winksaville avatar Jun 28 '17 02:06 winksaville

I think there is an interesting interaction with tasklets, but not w.r.t WebAssembly.Thread but, rather, based on the general goal of ES Module integration, you would be able to tasklet.addModule('foo.wasm') and that should Just Work.

lukewagner avatar Jul 03 '17 19:07 lukewagner

SGTM, but I would hope other thread semantics would also "just" work such as shared memory and atomics.

On Mon, Jul 3, 2017, 12:42 PM Luke Wagner [email protected] wrote:

I think there is an interesting interaction with tasklets, but not w.r.t WebAssembly.Thread but, rather, based on the general goal of ES Module integration https://github.com/WebAssembly/design/issues/1087, you would be able to tasklet.addModule('foo.wasm') and that should Just Work.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WebAssembly/threads/issues/39#issuecomment-312721136, or mute the thread https://github.com/notifications/unsubscribe-auth/AA-hHK-bJEiMCAwyGdkkYqhK__uR3Fj8ks5sKUQ2gaJpZM4OF45h .

winksaville avatar Jul 03 '17 23:07 winksaville

That is indeed the plan, though not specific to tasklets, but workers in general and shared memory via SharedArrayBuffer.

lukewagner avatar Jul 03 '17 23:07 lukewagner