Next: Asynchronous calls, Previous: Object construction, Up: Objects [Contents][Index]
Relative to a given vat, there are two types of objects. A near object is in the vat. A far object is in a different vat. Similarly, there are two ways to invoke objects: synchronously, or using traditional call-return, which only works for near objects; or asynchronously, which works for either near or far objects, and usually returns a promise. Synchronous and asynchronous invocation use different but similar procedures.
Call a near object’s behavior and return the result.
(define object-a (spawn ^some-object)) ;; in the same vat (define a-val ($ object-a arg1)) (define b-val ($ object-a 'some-method arg2))