3 ms·
I am most excited about the concurrency model! "Concurrency is supported via actor-like entities called isolates. An isolate is a unit of concurrency. It has i
by shykes 15y ago
I am most excited about the concurrency model!
"Concurrency is supported via actor-like entities called isolates. An isolate is a unit of concurrency. It has its own memory and its own thread of control. Isolates communicate by message passing (10.14.4). No state is ever shared between isolates. Isolates are created by spawning (10.11)"
http://www.dartlang.org/docs/spec/dartLangSpec.pdf http://www.dartlang.org/docs/spec/dartLangSpec.pdf
I wonder how they compile this down to Javascript?
- psawaya 15y agoThat doesn't sound so different from WebWorkers, which you can already use from javascript in newer browsers. https://developer.mozilla.org/en/Using_web_workers https://developer.mozilla.org/en/Using_web_workers
- shykes 15y agoThe model seems slightly different - don't WebWorkers share state?
- dasmoth 15y agoNo, just message passing (notionally via JSON).
- thepumpkin1979 15y agoAgree, it would be more interesting to know if it has some kind of built-in parallel support.
- moomin 15y agoWell, you can implement pretty much everything you just described as a library. The only thing missing is preventing memory sharing, but that you can sort out at compile time. An interesting question is if this means V8 is gaining threads.