C++ Logo

std-proposals

Advanced search

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

From: Thiago Macieira <thiago_at_[hidden]>
Date: Tue, 14 Feb 2023 07:15:02 -0800
On Tuesday, 14 February 2023 02:52:13 PST Frederick Virchanza Gotham via Std-
Proposals wrote:
> I want to show just how much typing this would save. The following code
> snippet:
>
> struct Monkey {
> void Func(void) noreentry_this_object(prevent_other_threads:skip)
>
> noreentry_all_objects(prevent_other_threads:wait)
> {
> // Main body of function goes here
> }
> };

How about with a recursive mutex?

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

Received on 2023-02-14 15:15:04