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!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Task_Barriers Date: Thu, 25 Jul 2019 22:11:36 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <1gtjjetkm3np9j7dglv91acgripnee2ao5@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 25 Jul 2019 20:11:36 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="ebb48fe47f7165ba0bf73128929e8cdb"; logging-data="26896"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HkQzNtAEMBW4qosDkH539Nt6Jy4llhUs=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Cancel-Lock: sha1:HjrNmmbwwI7jK56kYDT4kbHP57o= In-Reply-To: <1gtjjetkm3np9j7dglv91acgripnee2ao5@4ax.com> Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:56946 Date: 2019-07-25T22:11:36+02:00 List-Id: On 7/25/19 8:56 PM, Dennis Lee Bieber wrote: > > Ignoring the synchronization part, the loops have a one second delay > per cycle, and you are incrementing an integer. > > Presuming integer is 32 bits, that means a loop that will take > >>>> 0x7FFFFFFF > 2147483647 >>>> > > seconds to complete. According to my HP-48sx, 2147483647_s -> > 68.0511038598_yr (assuming integers generate overflow exceptions, your > program will complete sometime in 2087) No, T2 will complete then. T1, and so the whole program, will then be blocked indefinitely, IIUC the semantics of the Synchronous_Barrier. -- Jeff Carter "I've seen projects fail miserably for blindly applying the Agile catechism: we're Agile, we don't need to stop and think, we just go ahead and code!" Bertrand Meyer 150