Vat
From Erights
(Difference between revisions)
m (→Example: How to create a new Vat) |
m (→Example: How to create a new Vat) |
||
Line 21: | Line 21: | ||
? Thing: Hello Vat | ? Thing: Hello Vat | ||
- | #shutting down the vat | + | # shutting down the vat |
? def ack := vat <- orderlyShutdown("because I said so") | ? def ack := vat <- orderlyShutdown("because I said so") | ||
# value: <Promise> | # value: <Promise> | ||
</pre> | </pre> |
Revision as of 11:37, 21 April 2007
See [1].
Example: How to create a new Vat
introducer.onTheAir() # value: ["3DES_SDH_M2", "3DES_SDH_M"] ? def seedVatAuthor := <elang:interp.seedVatAuthor>(<unsafe>).virtualize(introducer) # value: <virtualSeedVat> ? def scriptSource:="def run(thing) {println(`Thing: $thing`)}" # value: "def run(thing) {println(`Thing: $thing`)}" ? def [scriptObj, vat] := seedVatAuthor(scriptSource) # value: [<Promise>, <Vat newVirtualSeedVat in <runs in newVirtualSeedVat>>] ? scriptObj<-run("Hello Vat") # value: <Remote Promise> ? Thing: Hello Vat # shutting down the vat ? def ack := vat <- orderlyShutdown("because I said so") # value: <Promise>