Skip to content

[Feature request] reentrancy macro guard #1534

@kareltucek

Description

@kareltucek

Making sure that 'daemon' macros are ran only once is actually a common usecase. It is easy to handle via variables, but adds a nontrivial amount of clutter into the code.

So the idea is to introduce some condition that can easily check whether there is already another instance of the same macro running. So the resulting syntax may be:

ifReentrant break
...

Or

ifNotReentrant {
...
}

Or maybe (this is ambiguous, compared to code that should be ran only once, so probably not).

once {
}

@mhantsch @firngrod @mondalaci any opinion on preferred syntax?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions