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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: RFC: Prototype for a user threading library in Ada Date: Fri, 17 Jun 2016 19:18:22 +0300 Organization: Tidorum Ltd Message-ID: References: <58b78af5-28d8-4029-8804-598b2b63013c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 9I+Eqm4edmnEDgFvynak+wJsjEcRLYDChC8ddfwFpvo7Q3TMjS Cancel-Lock: sha1:nqFE793XsAntloGsQqt+1xD3PD4= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 In-Reply-To: <58b78af5-28d8-4029-8804-598b2b63013c@googlegroups.com> Xref: news.eternal-september.org comp.lang.ada:30769 Date: 2016-06-17T19:18:22+03:00 List-Id: On 16-06-17 12:44 , Hadrien Grasland wrote: > So, a while ago, after playing with the nice user-mode threading > libraries that are available these days in C++, like Intel TBB and > HPX, I thought it would be nice if Ada had something similar. > > Looking around for existing work, I found a number of projects with > custom, relatively specialized mechanisms, and a very nice library > called Paraffin whose high-level data-parallel interface I found > highly interesting, but whose lower-level tasking abstractions did > not match what I had in mind. > > So I decided to have a go at my vision of a low-level user threading > model, taking plenty of inspiration from other designs which I am > fond of such as OpenCL's command queues. > > Today, I am confident that the resulting design and implementation is > solid enough for third party review. So if anyone here is interested, > please have a go at studying it on GitHub! > > https://github.com/HadrienG2/ada-async-tests I had a quick first look, and it seems interesting, but I have two suggestions to make the development more understandable to the Ada-oriented reader: - First, please do not redefine the word "task", even in the qualified form "asynchronous task". It is quite confusing, in the Ada context. - Second, I question the terminology of "user thread". The "events", or "asynchronous tasks", are not "threads" in the sense of keeping their own machine-level control-flow state; they are automata that are invoked from the "executors" through a single "Run" operation. If some control-flow state must be kept between invocations of "Run", the "asynchronous task" must keep it in Ada-level variables/components. I don't quite know what to call your "events" / "asynchronous tasks", but perhaps the term "work item", which you use in a comment, is better. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .