comp.lang.ada
 help / color / mirror / Atom feed
* Lightweight tasks to implement co-routines?
@ 2017-07-31 18:08 Victor Porton
  2017-07-31 20:00 ` Simon Wright
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Victor Porton @ 2017-07-31 18:08 UTC (permalink / raw)


This is a question primarily to Dmitry A. Kazakov who (if I don't mistake) 
proposed using lightweight tasks for co-routines.

I do not quite understand how exactly it should be done:

A task may contain several accepts with different names, but a co-routine 
can contain only one type of entry and it is always with one variable with 
"out" type (more conveniently represented as a function).

So should we standardize that tasks which serve as co-routines should have 
entries with the same name only?

Isn't it more convenient to make them like "yield" keyword in Python? We can 
for example require that all accepts have the name Yield and one out 
argument. (However, see above about using functions instead.)

If we so much modify the task API for implementing co-routines, isn't it 
lost the sense to use task API for this at all? For me it seems that we 
should instead go Python way and implement it as special functions with some 
kind of "yield" operator. What is the opinion of these who understand?

-- 
Victor Porton - http://portonvictor.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-01  6:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-31 18:08 Lightweight tasks to implement co-routines? Victor Porton
2017-07-31 20:00 ` Simon Wright
2017-07-31 21:01 ` Dmitry A. Kazakov
2017-08-01  4:56   ` Randy Brukardt
2017-08-01  6:47     ` Dmitry A. Kazakov
2017-08-01  4:53 ` Randy Brukardt
2017-08-01  6:49 ` Paul Rubin

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