comp.lang.ada
 help / color / mirror / Atom feed
From: Lutz Donnerhacke <lutz@iks-jena.de>
Subject: Combining entry_call, accept_statment and terminate_statment
Date: Mon, 29 Mar 2004 19:41:34 +0000 (UTC)
Date: 2004-03-29T19:41:34+00:00	[thread overview]
Message-ID: <slrnc6guve.g7p.lutz@belenus.iks-jena.de> (raw)

Sorry, but I do not get it:

I have a protected type with an entry:

  protected type PT is
     entry X;
  end PT;
  p : PT;

Now I have to construct a task dealing with new data from the protected
type, an call from other tasks or the termination of the parent task.
  task type TT is
     entry Config;
  end TT;
  
  task body TT is
  begin
     loop
        select
	   p.X;
	   -- dealing with new data
	or accept Config;
	   -- modify the task
	or terminate;
	end select;
     end loop;
  end TT;

Unfortunly this is not allowed. Either accept and terminate or an entry_call
and a delay can be combinded. I wonder how to solve such as deadlock. It
should be a common idiom, but I had no luck in choosing searching keywords.

Any hint?



             reply	other threads:[~2004-03-29 19:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-29 19:41 Lutz Donnerhacke [this message]
2004-03-29 22:04 ` Combining entry_call, accept_statment and terminate_statment Randy Brukardt
2004-03-29 23:19   ` Mark Lorenzen
2004-03-29 23:14     ` Robert I. Eachus
2004-03-30  7:26   ` Lutz Donnerhacke
2004-03-30 20:04     ` Randy Brukardt
2004-03-30 22:47       ` Lutz Donnerhacke
2004-03-31  9:03         ` Dmitry A. Kazakov
2004-03-31  9:14           ` Lutz Donnerhacke
2004-03-31 12:22             ` Dmitry A. Kazakov
2004-03-31  6:39       ` Jean-Pierre Rosen
2004-03-30  7:29   ` Lutz Donnerhacke
2004-03-30  8:11     ` tmoran
2004-03-30 11:45     ` Lutz Donnerhacke
2004-03-30  0:33 ` James Rogers
replies disabled

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