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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4e39e3650a0d633 X-Google-Attributes: gid103376,public From: Mats Weber Subject: Re: Icon Co-Expressions in Ada Date: 1998/12/17 Message-ID: <36794F71.762920E4@elca-matrix.ch>#1/1 X-Deja-AN: 423331262 Content-Transfer-Encoding: 7bit References: X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: ELCA Matrix SA Mime-Version: 1.0 Reply-To: Mats.Weber@elca-matrix.ch Newsgroups: comp.lang.ada Date: 1998-12-17T00:00:00+00:00 List-Id: Ehud Lamm wrote: > For this to work from arbitrary procedures, the language provides the > suspend statement, which is like return but after which the procedure may > be resumed.(you can have a procedure say suspend 4; suspend 5; for > example). > > I was thinking about implimenting this statement. Note that you ahve to > remember exactly where the computation stopped. This sounds like coroutines in other languages. The closest Ada has to offer is tasks, but as Ada tasks can be called concurrently, you will have a significant overhead over a simple coroutine mechanism.