guest271314 (2019-06-26T04:48:11.000Z)
Evidently ```TaskWorklet``` is no longer implemented by Chromium
https://bugs.chromium.org/p/chromium/issues/detail?id=879306. Though
```TaskQueue```
https://chromium.googlesource.com/chromium/src/+/64f633432afef4a8779b45229eb3b7a060222bb0
is
still defined at ```window```.

```
    (async() => {
      const queue = window.TaskQueue.default("best-effort");
      let result = void 0;
      await queue.postTask(function() { result = "task1" });
      console.log(result);
    })();
```

See also
https://github.com/WICG/main-thread-scheduling/blob/master/README.md#i-apis-to-improve-js-schedulers

On Tue, Jun 25, 2019 at 1:51 PM Robert Parham <adelphia at protonmail.ch>
wrote:

>
> Are there any threading proposals? If not, would anyone be interested in
> creating one?
>
> Webworkers are great, but require separate files that just aren't always
> convenient to maintain. I've
> created this wrapper for webworkers that allows users to create in-line
> disposable threads, somewhat
> similar to threads in Java.
>
> https://gist.github.com/Pamblam/683d5ae429448adfa6d6e7fb30de39b2
>
> If we could get something similar implemented natively that would be very
> cool.
>
> Robert "Gordie" Parham
> pamblam.com
> 813.616.0819
>
> [image: ad.png]
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190626/6e4639be/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ad.png
Type: image/png
Size: 187223 bytes
Desc: not available
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190626/6e4639be/attachment-0001.png>
guest271314 at gmail.com (2019-06-26T04:52:51.134Z)
Evidently ```TaskWorklet``` is no longer implemented by Chromium
https://bugs.chromium.org/p/chromium/issues/detail?id=879306. Though
```TaskQueue``` (```ScriptedTaskQueue```)
https://chromium.googlesource.com/chromium/src/+/64f633432afef4a8779b45229eb3b7a060222bb0
is
still defined at ```window```.

```
    (async() => {
      const queue = window.TaskQueue.default("best-effort");
      let result = void 0;
      await queue.postTask(function() { result = "task1" });
      console.log(result);
    })();
```

See also
https://github.com/WICG/main-thread-scheduling/blob/master/README.md#i