comp.lang.ada
 help / color / mirror / Atom feed
From: "Alejandro R. Mosteo" <alejandro@mosteo.com>
Subject: Re: Feature suggestion: different task schedules
Date: Mon, 24 Jul 2017 17:26:38 +0200
Date: 2017-07-24T17:26:38+02:00	[thread overview]
Message-ID: <ol53bv$4b8$1@dont-email.me> (raw)
In-Reply-To: <ol24ut$s8m$1@gioia.aioe.org>

On 23/07/17 14:31, Victor Porton wrote:
> Dmitry A. Kazakov wrote:
> 
>> On 18/07/2017 22:09, Randy Brukardt wrote:
>>> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
>>> news:okkcgc$1m31$1@gioia.aioe.org...
>>>> On 18/07/2017 02:09, Randy Brukardt wrote:
>>> ...
>>>>> And most important of all -- what problem
>>>>> needs to be solved.
>>>>
>>>> A co-routine with task interface lacking task overhead.
>>>
>>> I hate to sound like a broken record, but that's a solution, not a
>>> problem. One would need to explain what problem(s) can't be reasonably
>>> solved with the existing features of Ada that could be solved with a
>>> co-routine. (And a purely performance argument is by far the weakest
>>> IMHO; very few programs are really performance bound, and most of those
>>> would value more tasking.)
>>
>> It is not performance argument. It is it the first line design argument
>> (control flow inversion) as I explained in another post.
>>
>> I admit that I don't understand the OP proposal. It is not sufficiently
>> described and scheduling is not single issue here. Not in the cases I
>> have in mind.
>>
>> A task based solution is non-starter for two reasons.
>>
>> One is that it is not composable. I expect a co-routine proposal to
>> offer a possibility to implement stacked layered protocols. I don't see
>> how that would be possible on task basis. A protocol implementation may
>> not be a task object.
> 
> I don't understand why it is not composable. A task may call another tasks.
> Tasks may even call each others in a cycle.
> 
> However I think, we may have some sort of problem about specifying something
> in hypothetical Ada2020 what is similar to `yield from` in Python. It seems
> that for this we need to introduce something like "multi" accept statement,
> but I did not yet thought about this.

I'm not sure if this has been discussed here or if it is even the same 
feature as in Python, but there is an AI proposal for generator 
functions using "yield":

http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0197-1.txt?rev=1.7&raw=N

Álex.

> 
>> Another reason is design and OS constraints. Protocols must be handled
>> by worker tasks. Number of tasks <<< number of connections, e.g. number
>> of sockets.
> 


  parent reply	other threads:[~2017-07-24 15:26 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
2017-07-23 18:47               ` Dmitry A. Kazakov
2017-07-24 15:26               ` Alejandro R. Mosteo [this message]
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