From: "nootah" <nootah@ihug.co.nz>
Subject: Newbie: Clarification of non-determinsitcis selection in Ada rendevous Mechanism
Date: 2000/05/17
Date: 2000-05-17T00:00:00+00:00 [thread overview]
Message-ID: <8fstnl$dd$1@news.ihug.co.nz> (raw)
Hi people,
Currently studying a course where Ada is referred to but not taught and have
a brief section on Active Objects using the Ada rendevous mechanism as an
example.
Question is: if the selection of action from a select clause is
non-deterministic, then does the active object pause at the select statement
or does it elect one of the processes to wait for - the altter is what I
have been told. My problem with this - if multiple guard conditions are
simultaneously true, and one is selected prior to any call, then what occurs
when one of the client processes calls another guarded func.
e.g. where a=5
select
when a>0 =>
accept(FirstFunc)
when a<10 =>
accept(SecondFunc)
end select
end select
If object halts at select and waits for request from client
what happens if func called and guard condition not fulfilled ? -
presumably client blocks until condition met and task can respond - queues
the request and blocks client
On the other hand, if object elects FirstFunc, but client SecondFunc is
first call received - what happens ? presumably .. I have no idea!
Any help gratefully appeciated .
Cheers
Andy
next reply other threads:[~2000-05-17 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-17 0:00 nootah [this message]
2000-05-17 0:00 ` Newbie: Clarification of non-determinsitcis selection in Ada rendevous Mechanism Robert A Duff
2000-05-17 0:00 ` Ted Dennison
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox