comp.lang.ada
 help / color / mirror / Atom feed
From: "Peter C. Chapin" <PChapin@vtc.vsc.edu>
Subject: Re: Does GNAT support a thread-free RTS?
Date: Tue, 13 Sep 2011 06:57:05 -0400
Date: 2011-09-13T06:57:05-04:00	[thread overview]
Message-ID: <avSdnaVNFJeQqvLTRVn_vwA@giganews.com> (raw)
In-Reply-To: <m2fwk04zet.fsf@pushface.org>

On 2011-09-13 04:30, Simon Wright wrote:

> Simon Wright<simon@pushface.org>  writes:
>
> My prompt for asking this was a colleague who was used to Erlang and was
> complaining that GNAT's use of OS threads meant he would have to change
> his design mindset to not use thousands of tasks (Erlang processes).

If one is in control of the run time library and if the underlying OS 
supports asynchronous I/O, then I believe it is possible to write a user 
mode thread library that works "nicely" even in the face of I/O 
operations. When calling an I/O operation that might block the library 
uses asynchronous I/O so that the single kernel thread can be scheduled 
onto a different user thread while the I/O completes.

> I believe Scala is similar.

In Scala you can create "thread based" actors that consume a single 
thread each or "event based" actors that can all share a single thread. 
I haven't experimented with this but my guess is that if you do a 
blocking operation while handling an event you may well tie up all event 
based actors. I imagine the thread based actors would continue to work, 
however.

Peter



      parent reply	other threads:[~2011-09-13 10:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-10 15:19 Does GNAT support a thread-free RTS? Simon Wright
2011-09-11  8:20 ` J-P. Rosen
2011-09-11  9:22   ` John B. Matthews
2011-09-11  9:49     ` anon
2011-09-11 10:29       ` Pascal Obry
2011-09-12  0:33         ` anon
2011-09-12  7:27           ` Simon Wright
2011-09-12  9:26           ` Ludovic Brenta
2011-09-12  9:49             ` Ludovic Brenta
2011-09-13  1:22               ` anon
2011-09-12 13:01             ` Robert A Duff
2011-09-11 10:36   ` Simon Wright
2011-09-12  7:19   ` Ludovic Brenta
2011-09-12 23:22     ` Rugxulo
2011-09-13  7:03       ` Ludovic Brenta
2011-09-13  7:55         ` Ludovic Brenta
2011-09-13  8:30 ` Simon Wright
2011-09-13  9:39   ` Georg Bauhaus
2011-09-13 12:18     ` Dmitry A. Kazakov
2011-09-13 14:02       ` Robert A Duff
2011-09-13 16:35         ` Dmitry A. Kazakov
2011-09-13 16:54       ` Georg Bauhaus
2011-09-13 20:35         ` Dmitry A. Kazakov
2011-09-13 21:22           ` Georg Bauhaus
2011-09-14  7:58             ` Dmitry A. Kazakov
2011-09-13 10:57   ` Peter C. Chapin [this message]
replies disabled

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