at:tutorial:actors
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
at:tutorial:actors [2007/07/18 09:29] – elisag | at:tutorial:actors [2007/07/18 10:09] – elisag | ||
---|---|---|---|
Line 14: | Line 14: | ||
Generally speaking, an active object is an object that encapsulates its own thread of control. An active object also has a message queue or mailbox from which it processes incoming messages. Each message is processed sequentially. An active object responds to an incoming message by invoking the method corresponding to the message. The method is executed by the active object' | Generally speaking, an active object is an object that encapsulates its own thread of control. An active object also has a message queue or mailbox from which it processes incoming messages. Each message is processed sequentially. An active object responds to an incoming message by invoking the method corresponding to the message. The method is executed by the active object' | ||
- | ===== Actors and Far References ===== | + | ===== AmbientTalk |
In AmbientTalk, | In AmbientTalk, | ||
Line 37: | Line 37: | ||
</ | </ | ||
- | The figure below summarizes AmbientTalk' | + | The figure below summarizes AmbientTalk' |
{{ : | {{ : | ||
Line 98: | Line 98: | ||
The parameter passing semantics defined above rule out any possibility for an object to be passed by copy. The reason for this semantics is that objects encapsulate a lexical scope, and parameter passing an object by copy would require the entire lexical scope to be parameter-passed as well. | The parameter passing semantics defined above rule out any possibility for an object to be passed by copy. The reason for this semantics is that objects encapsulate a lexical scope, and parameter passing an object by copy would require the entire lexical scope to be parameter-passed as well. | ||
- | To enable objects to be passed by copy between actors, a special type of objects is introduced. These objects are called **isolates** because they are // | + | To enable objects to be passed by copy between actors, a special type of objects is introduced. These objects are called **isolates** because they are // |
< | < | ||
Line 137: | Line 137: | ||
</ | </ | ||
- | < | + | < |
- | A word of warning: isolates are objects that are copied freely between actors. As a result, they should be objects whose actual object identity is of little importance. Usually, the identity of by-copy objects is determined by the value of some of the object' | + | A word of warning: isolates are objects that are (deep) |
< | < | ||
def ==(other) { | def ==(other) { | ||
Line 146: | Line 146: | ||
</ | </ | ||
- | It is important to note that an isolate has no access whatsoever to its encompassing scope. | + | As already explained, |
< | < | ||
Line 159: | Line 159: | ||
</ | </ | ||
- | Sometimes | + | However, sometimes |
< | < |
at/tutorial/actors.txt · Last modified: 2020/02/05 21:26 by elisag