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,772ae8afc5db35f2 X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: Single Extension; Polymorphic Arrays Date: 1999/03/08 Message-ID: <36E40BD9.2652469B@averstar.com>#1/1 X-Deja-AN: 452641243 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-03-08T00:00:00+00:00 List-Id: Matthew Heaney wrote: > > stt@houdini.camb.inmet.com (Tucker Taft) writes: > > > For example, it is reasonable to use a singleton task or protected object > > to manage all access to an external device or other resource (e.g. > > a network). If this were exported as a task or protected *type* then > > there would be no protection against simultaneous access. > > I was thinking that you'd declare the task type and one instance of that > type together in a package body. That wouldn't really address the problem, in my view. You may want to export the fact that the manager is a protected or task object, so timed or conditional entry call syntax can be used. Furthermore, even if it is in a package body, to help the future reader/maintainer you would have to say something like "only one instance of this type is allowed." Seems a bit kludgey. Fundamentally, task and protected types and objects are special, because they provide synchronization, and with synchronization, uniqueness makes a big difference. > ... -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA