comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: weird block on Get from basic protected bounded buffer with 2 tasks
Date: Tue, 12 Dec 2017 21:18:53 +0100
Date: 2017-12-12T21:18:53+01:00	[thread overview]
Message-ID: <p0pdjd$2bk$1@dont-email.me> (raw)
In-Reply-To: <fdea6430-6fca-413b-a677-27a8f04e4a95@googlegroups.com>

On 12/12/2017 08:08 PM, George Shapovalov wrote:
> 
>      abort Getter;

Getter isn't blocking; it's been aborted.

There's a deadlock: if Get is called 1st, it blocks because Count = 0. If Put is 
then called, it blocks because Get'Count > 0. Nothing can then change Count 
unless the call to Get is aborted.

If I change the abort statement to "null;" and remove the check on Get'Count in 
Put's barrier, it works fine for me.

-- 
Jeff Carter
"Since I strongly believe that overpopulation is by
far the greatest problem in the world, this [Soylent
Green] would be my only message movie."
Charleton Heston
123


  reply	other threads:[~2017-12-12 20:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 19:08 weird block on Get from basic protected bounded buffer with 2 tasks George Shapovalov
2017-12-12 20:18 ` Jeffrey R. Carter [this message]
2017-12-12 20:55   ` George Shapovalov
2017-12-12 21:01     ` George Shapovalov
2017-12-12 21:16 ` Dmitry A. Kazakov
2017-12-13  9:25   ` George Shapovalov
replies disabled

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