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 X-Received: by 10.157.15.241 with SMTP id m46mr15132896otd.13.1464473479118; Sat, 28 May 2016 15:11:19 -0700 (PDT) X-Received: by 10.157.4.120 with SMTP id 111mr289504otc.15.1464473479087; Sat, 28 May 2016 15:11:19 -0700 (PDT) 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.glorb.com!b4no121060igl.0!news-out.google.com!yi6ni1329igc.0!nntp.google.com!b4no121053igl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 28 May 2016 15:11:18 -0700 (PDT) In-Reply-To: <22fc2a58-67ad-4483-bf9c-0bdc463b31ab@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.229.251.36; posting-account=HFCrOQoAAABZD_f-UUbYHm3lJDIrh-UX NNTP-Posting-Host: 85.229.251.36 References: <22fc2a58-67ad-4483-bf9c-0bdc463b31ab@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: User threads in Ada ? From: joakimds@kth.se Injection-Date: Sat, 28 May 2016 22:11:19 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:30508 Date: 2016-05-28T15:11:18-07:00 List-Id: Den l=C3=B6rdag 28 maj 2016 kl. 23:08:03 UTC+2 skrev Hadrien Grasland: > Hi everyone, >=20 > Recently, cooperatively scheduled user threads have become popular again = in the parallel programming community. The main goal behind their use is ty= pically to avoid spawning, blocking and liberating kernel threads all the t= ime, which comes with some significant overhead. >=20 > Some C++ libraries such as Intel TBB and HPX now make it much easier and = portable than before to deal with such user threads, in no small part thank= s to a couple of nice abstractions, such as asynchronous function calls ret= urning futures that provide event-like synchronization. >=20 > I'm currently playing around with this concept in Ada, and wondering how = far it can be taken. The first thing to do being, of course, to tell what i= s already there. Is anyone aware of previous work related to implementing u= ser threads in Ada ? >=20 > Cheers, > Hadrien Dear Hadrien, What comes to my mind is the Generic_Tasking package I wrote to create a po= ol of worker tasks and to distribute the work-load on them: https://github.com/joakim-strandberg/determine_prime_numbers_on_many_core_s= ystems I have not looked at TBB nor HPX but can imagine their API is nicer and mor= e thought through. Brad Moore has shared code also. Google for "Paraffin". Best regards, Joakim