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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3089024a3e433566 X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: an error in Re: tasking Date: 1998/10/16 Message-ID: #1/1 X-Deja-AN: 401792286 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1998-10-16T00:00:00+00:00 List-Id: Frank Ecke (franke@minet.uni-jena.de) wrote: : ... : Very well, but why is a rendezvous not an abort-deferring operation when the : server is aborted? Or, to be more precise, why is the rendezvous treated : differently in the case of aborting a task that executes an accept statement : and in the case of aborting the triggering entry call in the ATC statement? : After all, it is the server that manipulates the global data structures and : aborting it creates the mess. The rendezvous model is that a server doesn't manipulate global data structures. They manipulate their *own* data structures. In other words, the server is "global," the data structures are internal to the server. So if you abort the server, then there is nothing to protect, since the data structures are internal to the server. Aborting this kind of server task is analogous to doing an unchecked deallocation on an object. You had better do it only when you have no further interest in the object. There are other interesting models, where there are multiple server tasks, all sharing a common data structure. In Ada 83, the only way to do this would have been to have yet another task, which all the server tasks communicated with, which managed this shared common data structure. In Ada 95, this shared common data structure could be a protected object. In either model, the actual manipulation of the shared common data structure by the multiple servers would be abort-deferred, because it would be implemented by entry (or protected) *calls* on the shared common data object/task, not on *accepts.* In almost any conceivable use of rendezvous, the accept statement is the time when the acceptor updates its own *internal* data structures, and communicates with the caller. It is not the time when it manipulates some shared global data structure (unless there is a nested entry/protected call inside the accept statement, which again would be abort-deferred). : I hope someone can shed some light on these issues. See above. : Frank : -- : Frank Ecke -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA An AverStar Company