Allowing send to actor

While we may need still revisit a send-like operation sometime for other reasons, the semantic equivalent of it is achieved once this proposal is implemented: Closure isolation control

and It'd be spelled as Task { await target.hello() }.

That proposal changes the enqueue semantics to become "immediately enqueue on target" (since we notice that's the first thing this does), as well as the explicit version of it Task { [isolated target] in target.hello() } which the proposal discusses (and also would mean "enqueue immediately".

There's some more tricky things here with distributed actors, as you may need to express that an "uni-directional" -> Void is significantly different than a -> Void that you must wait for etc.

So there's more to be discussed, but currently the thinking is towards those closure isolation control and changing the enqueue behavior. It handles most of the cases.

6 Likes