Un ejemplo de paralelismo manejado por un lenguaje de alto nivel.
Walnut/Distributed Computing - Erights
Walnut/Distributed Computing - Erights
Eventually Operator
All distributed computing in E starts with the eventually operator, "<-":
# E syntax
pragma.syntax("0.9")
car <- moveTo(2,3)
println("car will eventually move to 2,3. But not yet.")Promises
When you make an eventual send to an object (referred to hereafter simply as a send, which contrasts with a call
to a local object that waits for the action to complete), even though
the action may not occur for a long time, you immediately get back a
promise for the result of the action:# E syntax
def carVow := makeCar <- ("Mercedes")
carVow <- moveTo(2,3)
Powered by ScribeFire.
No hay comentarios:
Publicar un comentario