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.6 date: 2021/01/20 14:32:27
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.
    ].

copyright

COPYRIGHT (c) 1995 by Claus Gittinger All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

instance creation
o  receiver: r selector: sel
(comment from inherited method)
create & return a new instance which can be used to
send sel to some receiver, r


Instance protocol:

evaluation
o  value
evaluate the messagesend with the original arguments



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 09:31:53 GMT