<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: Asynchronous Messaging</title></head><body>
<div>Stephen,<br>
<br>
I've been eager to play with your code ever since you posted it, and
now that I finally had the chance I have to say it's absolutely
wonderful!<br>
<br>
Of course, one of the first things I did was add "Trampoline"
support so you can now use direct messaging syntax such as:<br>
<br>
<x-tab> </x-tab>jeff asend
name:'Jeff Smith'.<br>
instead of<br>
<x-tab> </x-tab>jeff asend:#name: with:#('Jeff Smith').<br>
<br>
However, I am having problems with parts of the code, especially with
#send: sometimes being implemented as a straight #asend: (and
potentially deadlocking if not), the mysterious #answer:
implementation (what is at:3 ? -- it fails with some of my mods) etc.
<br>
<br>
Maybe you could explain your code a little?<br>
<br>
Regards,<br>
<br>
Marcel<br>
<br>
Attached, an updated/downgraded changeset.<br>
<attachment missing><br>
<br>
<br>
> From: "Stephen Pair" <spair@advantive.com> <br>
><br>
> A week or two ago there was a lengthy discussion on the topic of
coroutines <br>
> vs. sub-routines that peaked my interest quite a bit. To
educate myself a <br>
> little more on the topic, I wrote a small asynchronous messaging
capability. <br>
> Basically, each object has a message queue, and each method
context has an <br>
> answer queue. Multiple answers can be passed back to a
sender through this <br>
> answer queue. Messages can be sent synchronously,
asynchrounsly, or queued <br>
> asynchronously. The interesting thing to me is that it
seems like the whole <br>
> notion of processes could go away, leaving only method (or block)
contexts <br>
> to be scheduled. Also of interest is the notion that a
stack architecture <br>
> really only handles the specialized case of a synchronous message
send. I <br>
> believe these things we're discussed at length in the previous
thread. <br>
> <br>
> Anyway, I had fun exploring the topic and thought I'd share the
code...I'd <br>
> be curious to know more about how the Smalltalk-72 system worked.
<br>
> <br>
> The change set is at http://www.advantive.com/squeak <br>
> <br>
> - Stephen <br>
> <br>
> <br>
> <br>
</div>
<div><font face="Helvetica">Stephen,</font></div>
<div><font face="Helvetica"><br></font></div>
<div><font face="Helvetica">I've been eager to play with your code
ever since you posted it, and now that I finally had the chance I have
to say it's absolutely wonderful!</font></div>
<div><font face="Helvetica"><br></font></div>
<div><font face="Helvetica">Of course, one of the first things I did
was add "Trampoline" support so you can now use direct
messaging syntax such as:</font></div>
<div><font face="Helvetica"><br></font></div>
<div><font
face="Helvetica"><x-tab>
</x-tab>jeff asend name:'Jeff Smith'.</font></div>
<div><font face="Helvetica">instead of</font></div>
<div><font
face="Helvetica"><x-tab>
</x-tab>jeff asend:#name: with:#('Jeff Smith').</font></div>
<div><font face="Helvetica"><br></font></div>
<div><font face="Helvetica">However, I am having problems with parts
of the code, especially with #send: sometimes being implemented as a
straight #asend: (and potentially deadlocking if not), the mysterious
#answer: implementation (what is at:3 ? -- it fails with some of my
mods) etc. </font></div>
<div><font face="Helvetica"><br></font></div>
<div><font face="Helvetica">Maybe you could explain your code a
little?</font></div>
<div><font face="Helvetica"><br></font></div>
<div><font face="Helvetica">Regards,</font></div>
<div><font face="Helvetica"><br></font></div>
<div><font face="Helvetica">Marcel</font></div>
<div><font face="Helvetica"><br></font></div>
<div><font face="Helvetica">Attached, an updated/downgraded
changeset.</font></div>
<div><br>
content-type: application/octet-stream; x-unix-mode=0644;
name=ASyncMsg.23Jun717am.cs<br>
<br>
Attachment converted: Anon:ASyncMsg.23Jun717am.cs (????/----)
(0000AD07)</div>
<div><font face="Helvetica"><br></font></div>
<div><font face="Helvetica"><br></font></div>
<div><font face="Helvetica"><br></font></div>
<div><font face="Helvetica">> From: "Stephen Pair"
<spair@advantive.com> </font></div>
<div><font face="Helvetica">></font></div>
<div><font face="Helvetica">> A week or two ago there was a lengthy
discussion on the topic of coroutines </font></div>
<div><font face="Helvetica">> vs. sub-routines that peaked my
interest quite a bit. To educate myself a </font></div>
<div><font face="Helvetica">> little more on the topic, I wrote a
small asynchronous messaging capability. </font></div>
<div><font face="Helvetica">> Basically, each object has a message
queue, and each method context has an </font></div>
<div><font face="Helvetica">> answer queue. Multiple answers
can be passed back to a sender through this </font></div>
<div><font face="Helvetica">> answer queue. Messages can be
sent synchronously, asynchrounsly, or queued </font></div>
<div><font face="Helvetica">> asynchronously. The interesting
thing to me is that it seems like the whole </font></div>
<div><font face="Helvetica">> notion of processes could go away,
leaving only method (or block) contexts </font></div>
<div><font face="Helvetica">> to be scheduled. Also of
interest is the notion that a stack architecture </font></div>
<div><font face="Helvetica">> really only handles the specialized
case of a synchronous message send. I </font></div>
<div><font face="Helvetica">> believe these things we're discussed
at length in the previous thread. </font></div>
<div><font face="Helvetica">> </font></div>
<div><font face="Helvetica">> Anyway, I had fun exploring the topic
and thought I'd share the code...I'd </font></div>
<div><font face="Helvetica">> be curious to know more about how the
Smalltalk-72 system worked. </font></div>
<div><font face="Helvetica">> </font></div>
<div><font face="Helvetica">> The change set is at
http://www.advantive.com/squeak </font></div>
<div><font face="Helvetica">> </font></div>
<div><font face="Helvetica">> - Stephen </font></div>
<div><font face="Helvetica">> </font></div>
<div><font face="Helvetica">> </font></div>
<div><font face="Helvetica">> </font></div>
</body>
</html>