eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'MessageChannel':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: MessageChannel


Inheritance:

   Object
   |
   +--Message
      |
      +--MessageSend
         |
         +--MessageChannel

Package:
stx:libbasic2
Category:
Kernel-Methods
Version:
rev: 1.5 date: 2003/08/29 19:21:23
user: cg
file: MessageChannel.st directory: libbasic2
module: stx stc-classLibrary: libbasic2

Description:


MessageChannel provides the same functionality as MessageSend.
It has been provided for ST-80 compatibility.

Like with MessageSend, instances of MessageChannel can be used for 
simulation programs.
They keep some receiver and selector and can be evaluated at any time later.
(think of them as a cheaper alternative to blocks).

In contrast to MessageSend, MessageChannels expect arguments to be passed
if all sends are going to the same receiver, use:

example:
    |q|

    q := Queue new:120.
    1 to:100 do:[:i |
        q nextPut:(MessageChannel receiver:i selector:#+).
    ].
    [q notEmpty] whileTrue:[
        |m|

        m := q next.
        (m value:1) printNL.
    ].


Class protocol:

instance creation
o  receiver: r selector: sel


Instance protocol:

evaluation
o  value
evaluate the messagesend with the original arguments



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Wed, 24 Apr 2024 12:58:01 GMT