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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,81bb2ce65a3240c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.157.134 with SMTP id b6mr1238797bkx.5.1337062503746; Mon, 14 May 2012 23:15:03 -0700 (PDT) Path: e27ni3751bkw.0!nntp.google.com!news2.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.musoftware.de!wum.musoftware.de!news2.arglkargh.de!nuzba.szn.dk!news.jacob-sparre.dk!hugin.jacob-sparre.dk!news.thorslund.org!pnx.dk!not-for-mail From: Gustaf Thorslund Newsgroups: comp.lang.ada Subject: Re: What would you like in Ada202X? Date: Tue, 15 May 2012 08:15:03 +0200 Organization: gustaf.thorslund.org Message-ID: References: NNTP-Posting-Host: localhost Mime-Version: 1.0 X-Trace: katthult.thorslund.org 1337062503 28951 ::1 (15 May 2012 06:15:03 GMT) X-Complaints-To: usenet@thorslund.org NNTP-Posting-Date: Tue, 15 May 2012 06:15:03 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-05-15T08:15:03+02:00 List-Id: On 2012-05-15 00:49, tmoran@acm.org wrote: >> I suppose somewhere there need to be a way to set max concurrency. > This ability to say something about the resources to use on the target > machine is normally done with compilation parameters, which is pretty > limiting. Specifying the max concurrency for a piece of code is analogous > to specifying that certain arrays are rarely accessed and are good > candidates for swapping, while others really need to stay in RAM. I've > not seen that in a language either. I agree it would be kind of stupid setting it at compilation time. Was thinking of some way setting it at runtime. Then this could be given as a command line argument or in a configuration file, but this would be up to the user to do. With a database (DBMS) (or browser, or email client...) you would not want to set the size of buffers and memory used at compilation time, but you would still want to have it configurable. Looking at "I in 1..5" vs "X in 1..50000" one might expect the first one to run with full concurrency, but most of us wouldn't want it on the second one (at least not today, but maybe 202X). Nested/recursive calls could also result in a bit too much concurrency. If there should be a global limit and/or local limit I'd leave for others to discuss. For local concurrency control one might still prefer to do with all I in 1 .. 10 do for J in I .. 1000*I loop { stmt } end loop; end do all; -- or end with all; instead of with all J in 1 .. 10000 do { stmt } end do all; -- or end with all; But that would be up to the user to decide and could be related to resource allocation needed for each concurrent sequence of statements or aggregating of the results. Regards, Gustaf -- http://gustaf.thorslund.org