Date: Thu, 1 Jun 2023 21:58:22 -0300
I use that pattern all the time. It's useful.
Worth mentioning it's not fool proof.
Developers will often search for something in the container, returning the
iterator.
Then the iterator outlives the locked scope and things go sour.
Em qui., 1 de jun. de 2023 21:54, Phil Bouchard <boost_at_[hidden]> escreveu:
>
>
> On 6/1/23 20:50, Breno Guimarães wrote:
> > Ok, it didn't change anything. You still need to think and be carefully
> > explicit about the locking scope.
> > I guess folks were just picking on the point that it's impossible for
> > the compiler to know the scope. It must be informed by the developer.
> > So everyone is aligned then.
>
> Thanks.
>
> So we would just need to be minimally explicit at the semantic level and
> to add "thread and scope recursive" mutices.
>
>
> --
> Logo <https://www.fornux.com/>
> *Phil Bouchard* facebook icon
> <https://www.linkedin.com/in/phil-bouchard-5723a910/>
> Founder & CEO
> T: (819) 328-4743
> E: phil_at_[hidden]| www.fornux.com <http://www.fornux.com>
> 8 rue de la Baie| Gatineau (Qc), J8T 3H3 Canada
>
> Banner <https://goglobalawards.org/> Le message ci-dessus, ainsi que les
> documents l'accompagnant, sont destinés uniquement aux personnes
> identifiées et peuvent contenir des informations privilégiées,
> confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce
> message par erreur, veuillez le détruire.
> This communication (and/or the attachments) is intended for named
> recipients only and may contain privileged or confidential information
> which is not to be disclosed. If you received this communication by
> mistake please destroy all copies.
>
>
Worth mentioning it's not fool proof.
Developers will often search for something in the container, returning the
iterator.
Then the iterator outlives the locked scope and things go sour.
Em qui., 1 de jun. de 2023 21:54, Phil Bouchard <boost_at_[hidden]> escreveu:
>
>
> On 6/1/23 20:50, Breno Guimarães wrote:
> > Ok, it didn't change anything. You still need to think and be carefully
> > explicit about the locking scope.
> > I guess folks were just picking on the point that it's impossible for
> > the compiler to know the scope. It must be informed by the developer.
> > So everyone is aligned then.
>
> Thanks.
>
> So we would just need to be minimally explicit at the semantic level and
> to add "thread and scope recursive" mutices.
>
>
> --
> Logo <https://www.fornux.com/>
> *Phil Bouchard* facebook icon
> <https://www.linkedin.com/in/phil-bouchard-5723a910/>
> Founder & CEO
> T: (819) 328-4743
> E: phil_at_[hidden]| www.fornux.com <http://www.fornux.com>
> 8 rue de la Baie| Gatineau (Qc), J8T 3H3 Canada
>
> Banner <https://goglobalawards.org/> Le message ci-dessus, ainsi que les
> documents l'accompagnant, sont destinés uniquement aux personnes
> identifiées et peuvent contenir des informations privilégiées,
> confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce
> message par erreur, veuillez le détruire.
> This communication (and/or the attachments) is intended for named
> recipients only and may contain privileged or confidential information
> which is not to be disclosed. If you received this communication by
> mistake please destroy all copies.
>
>
Received on 2023-06-02 00:58:34