3 ms·
> What's great about the actor model is that you can kinda apply it in languages not having such native support. Yep, although not listed in the article, JS wo
by readittwice 8y ago
> What's great about the actor model is that you can kinda apply it in languages not having such native support.
Yep, although not listed in the article, JS would be such an example for me. TBH I am not entirely sure what's the difference between Web Workers and Isolates but for me it's more or less the same: Both allow safe multi-threading simply because threads do have separate heaps.
- markdog12 8y ago> TBH I am not entirely sure what's the difference between Web Workers and Isolates > dart:isolate - This library was an attempt to provide a single API that provides common concurrency functionality across Dart's web and native platforms. While useful in some cases, most users found the isolate API limiting compared to the Web Workers API. The infrastructure for supporting isolates also adds substantial overhead when compiling to JavaScript. In the future, you should use Web Workers to access concurrency on the web. > Part of the isolate API has never worked (spawnFunction) in JS platforms, and the other (spawnFile) doesn't work in Dart/AOT (Flutter). Neither are able to use transferrable/shared memory objects > On the other hand, the JS platform has evolved quite a bit since isolates were created: Web workers Service workers Animation worklets ... and other APIs like SharedArrayBuffer ... we'd like to enable our web users to seemingly use these, with as little overhead as possible From https://groups.google.com/a/dartlang.org/forum/#!topic/misc/djfFMNCWmkE https://groups.google.com/a/dartlang.org/forum/#!topic/misc/...