From: Victor Porton <porton@narod.ru>
Subject: Lightweight tasks to implement co-routines?
Date: Mon, 31 Jul 2017 21:08:32 +0300
Date: 2017-07-31T21:08:32+03:00 [thread overview]
Message-ID: <olnrmv$1quu$1@gioia.aioe.org> (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
next reply other threads:[~2017-07-31 18:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-31 18:08 Victor Porton [this message]
2017-07-31 20:00 ` Lightweight tasks to implement co-routines? 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox