> Where is your ownership?

The main thread has all ownership.

On Wed, Nov 2, 2016 at 11:14 AM, Leo Dutra <[email protected]> wrote:

> > there are additional checks for scoping to prevent escape from
> isolation that would be needed as well.. not to mention being able to call
> other functions, similarly isolated - Michael
>
> Yes. Expected. And where is the problem? You already have async await
> inside async await. What would change?
> You already share variables and all the outer scope stuff.
>
> There's not a problem with frozen object in workers. But the proposal is
> for multithreading, very different from worker. A worker could be run in a
> process for workers, as it happens in some implementations. A thread is a
> thread. Is directly connected with the process idea originated from POSIX.
> And another facade, worker requires an separate script or dynamic eval.
> This is not maintanance friendly.
>
> Bradley... ownership in JavaScript? Ownership in Rust is applicable...
> every let in Rust, without mutation explicitation, requires ownership.
> JavaScript is the total opposite.
>
> Why would you want ownership today with multithreading if you don't have
> it with single thread?
>
> ​
> ​Ex:
>
> (function outer() {
>   let a = 1;
>
>   let b = async function() {
>      a = 2
>   }
>
>   await b()
>   console.log(a === 2) -> true
>
> })()​
>
> Where is your ownership?
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to