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!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: hreba Newsgroups: comp.lang.ada Subject: Re: GTK and tasking (GNAT) Date: Sun, 04 May 2014 18:32:45 -0300 Message-ID: References: <1db3ntu987ypk$.6zu9ghm9azm0.dlg@40tude.net> <14ydfwlh6wfe4$.1rv26jm958z.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net EjysLiMP6xsTyFLoEcIEQQltsafCnjPtphTAHM7kHAQ+7YoVwQ Cancel-Lock: sha1:s0QB9Mq7fXI/XmUe+o6zEhKGOIY= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:19673 Date: 2014-05-04T18:32:45-03:00 List-Id: On 05/04/2014 06:07 PM, Shark8 wrote: > On 04-May-14 14:40, hreba wrote: >> >> After the experience with my small exercise here, without tasking, I >> would expect the progress bar to jump from 0 to 1 at the end of a >> lengthy calculation instead of increasing steadily. >> >> This kind of life display is one reason for me to worry about tasking. > > The problem isn't tasking, it's decomposition. > If the "lengthy function" cannot be broken down then there are only two > points that we can really know: start, and finished. (i.e 0.0 & 1.0) > > If, on the other hand, we can break it down, say into eighths, we get: > 0.0, 0.125, 0.250, 0.375, 0.500, 0.625, 0.75, 0.875, 1.000 > Which is n+1 states, where n is the cardinality of the resolution of > "breaking it down". ( As an example regarding DB-access/-processing > being so decomposed, watch this: > https://www.youtube.com/watch?v=mD4GJ36Npqk ) I am talking about calculations that can be broken down, as in my example at the beginning of this thread: I count from 1 to 10, update a text box and call delay at each iteration, but the display changes only after the termination of the loop. -- Frank Hrebabetzky +55 / 48 / 3235 1106 Florianopolis, Brazil