From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Xref: utzoo comp.edu:2913 comp.lang.ada:3176 comp.lang.misc:3895 Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!inria!imag!mururoa!marat.osf.fr!macrakis From: macrakis@marat.osf.fr (Stavros Macrakis) Newsgroups: comp.edu,comp.lang.ada,comp.lang.misc Subject: Re: Teaching Concurrency Message-ID: <91@mururoa.imag.fr> Date: 15 Jan 90 11:10:33 GMT References: <650@ajpo.sei.cmu.edu> <7588@hubcap.clemson.edu> <602@agcsun.UUCP> <10330@june.cs.washington.edu> Sender: news@imag.fr Reply-To: macrakis@marat.osf.fr (Stavros Macrakis) Followup-To: comp.edu Organization: OSF Research Institute List-Id: In article <650@ajpo.sei.cmu.edu>, griest@ajpo.sei.cmu.edu (Tom Griest) writes: > The important thing to consider is that tasks should be used > for operations which are really likely to be physically concurrent. I strongly disagree. Tasking is a structuring mechanism as much as it is a concurrency mechanism. There are applications of tasks where concurrency is a happy accident. The standard name for this is "coroutines". Applications for coroutines include simulation and data structure transformation (cf. in particular the Jackson method). Modules in producer- consumer relations (cf. Unix pipes) are a good candidate -- of course in this case there is often the possibility of concurrency. For many years, assembly language programmers were the only ones to benefit from coroutine structures because no mainstream programming languages supported them. Ada's support for coroutines is an important step forward. Of course, in order to benefit fully from this structuring mechanism, the implementation should be efficient. As far as I know, there are no Ada compilers today where coroutine call is comparable to subroutine call in its cost (as it can be in principle). -s