From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Task safe containers? Help needed.
Date: Tue, 10 Oct 2017 09:25:50 +0200
Date: 2017-10-10T09:25:50+02:00 [thread overview]
Message-ID: <orhslu$pji$1@gioia.aioe.org> (raw)
In-Reply-To: orgr65$cs4$1@franka.jacob-sparre.dk
On 09/10/2017 23:54, Randy Brukardt wrote:
> If some of the operations are functions, and you have an up-to-date
> compiler, then use aspect Exclusive_Functions so that the mutual exclusion
> extends to the functions as well as the procedures in the protected object.
Interesting.
BTW, if protected types were declared as a normal types without ugly
C++-ish brackets, then we could simply have it passed in-out mode.
Functions are now allowed to have this. Or it could be passed as a
non-constant anonymous access. Both would naturally imply
"update-exclusion", no aspect ever needed.
> Otherwise, functions aren't *officially* exclusive, so you have to use all
> procedures for proper exclusion.
I see it as an advantage, actually. A mutex-based solution could deploy
read-write mutex to achieve the same effect. Functions would take mutext
in the read-only mode. Procedures would use the full-access mode.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2017-10-10 7:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-08 4:27 Task safe containers? Help needed reinert
2017-10-08 5:42 ` Niklas Holsti
2017-10-08 6:57 ` Dmitry A. Kazakov
2017-10-08 15:10 ` reinert
2017-10-08 16:05 ` Dmitry A. Kazakov
2017-10-09 9:18 ` reinert
2017-10-09 21:54 ` Randy Brukardt
2017-10-10 7:25 ` Dmitry A. Kazakov [this message]
2017-10-10 19:48 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox