C++ Logo


Advanced search

Re: [std-proposals] int Func(void) noreentry(-1)

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 13 Feb 2023 18:24:37 -0800
On Monday, 13 February 2023 14:56:07 PST Frederick Virchanza Gotham via Std-
Proposals wrote:
> Did you see the "-1" in the original subject line? That's where you
> specify the return value when a re-entrance is prevented. To answer
> your question: When re-entry is prevented, it simply returns -1. The
> second attempted invocation is simply 'skipped' so to speak.

Then please add to your paper how the programmer is allowed to choose that the
reentrancy is prevented by a wait until the other thread finishes or, if it's
not possible, why you don't think it needs to be part of this implementation.

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2023-02-14 02:24:39