comp.lang.ada
 help / color / mirror / Atom feed
From: Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject: Re: Feature suggestion: different task schedules
Date: Sun, 23 Jul 2017 16:05:19 -0400
Date: 2017-07-23T16:05:19-04:00	[thread overview]
Message-ID: <75v9nch4cutg0s3vgk6luc2kc656u6qo32@4ax.com> (raw)
In-Reply-To: 42284bba-65d6-4dfc-886e-3ea929b3ad5f@googlegroups.com

On Sun, 23 Jul 2017 07:19:37 -0700 (PDT), Egil H H <ehh.public@gmail.com>
declaimed the following:

>On Sunday, July 23, 2017 at 2:31:29 PM UTC+2, Victor Porton wrote:
>> It seems that for this we need to introduce something like "multi" accept 
>> statement, 
>
>Do you mean like the selective accept (RM 9.7.1)?
>

	Given my impression was totally the opposite, any proposal from the OP
will need to be completely and clearly defined in behavior in order to
reach a consensus. I was thinking this was something to do with (using
Python's yield as the example) multiple breakpoints (accepts) responding in
sequence but with only a single external name.


	IOW: Python executes code up through the next yield when invoked, and
the object is blocked after the yield returns a value. Ada accept OTOH
blocks waiting for the invocation and continues executing code after the
resultant rendezvous (only be putting all the code within the accept blocks
can you get something similar).

def theName():
	while True:
		x = do_something()
		yield x
			#block after yield
		x = do_something_else()
		yield x
			#block after yield

vs (apologies for the pseudo-Ada syntax)

loop
	#block before accept
	accept theName(out x : sometype) do
		x = do_something;
	end theName;
	#block before accept
	accept theName(out x : sometype) do	
		x = do_something_else;
	end theName;
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/


  parent reply	other threads:[~2017-07-23 20:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13 20:20 Feature suggestion: different task schedules Victor Porton
2017-07-13 21:58 ` Victor Porton
2017-07-13 22:11   ` Victor Porton
2017-07-14  5:59 ` Pascal Obry
2017-07-14  8:37   ` Dmitry A. Kazakov
2017-07-15 11:30 ` Victor Porton
2017-07-15 19:23   ` Niklas Holsti
2017-07-15 20:01   ` Simon Wright
2017-07-16 18:48   ` Jeffrey R. Carter
2017-07-16 19:05     ` Dmitry A. Kazakov
2017-07-16 20:25       ` Simon Wright
2017-07-18  0:09     ` Randy Brukardt
2017-07-18  7:14       ` Dmitry A. Kazakov
2017-07-18 15:28         ` Shark8
2017-07-18 16:06           ` Dmitry A. Kazakov
2017-07-18 20:09         ` Randy Brukardt
2017-07-19  7:24           ` Dmitry A. Kazakov
2017-07-23 12:31             ` Victor Porton
2017-07-23 14:19               ` Egil H H
2017-07-23 20:03                 ` Victor Porton
2017-07-23 20:05                 ` Dennis Lee Bieber [this message]
2017-07-23 18:47               ` Dmitry A. Kazakov
2017-07-24 15:26               ` Alejandro R. Mosteo
2017-07-24 19:56                 ` Dmitry A. Kazakov
  -- strict thread matches above, loose matches on Subject: below --
2017-07-18  0:45 Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox