comp.lang.ada
 help / color / mirror / Atom feed
* Combining entry_call, accept_statment and terminate_statment
@ 2004-03-29 19:41 Lutz Donnerhacke
  2004-03-29 22:04 ` Randy Brukardt
  2004-03-30  0:33 ` James Rogers
  0 siblings, 2 replies; 15+ messages in thread
From: Lutz Donnerhacke @ 2004-03-29 19:41 UTC (permalink / 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?



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-03-31 12:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-29 19:41 Combining entry_call, accept_statment and terminate_statment Lutz Donnerhacke
2004-03-29 22:04 ` 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

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