Defer Mechanism for {C} - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Ouvrage (Y Compris Édition Critique Et Traduction) Année : 2020

Defer Mechanism for {C}

Résumé

The defer mechanism can restore a previously known property or invariant that is altered during the processing of a code block. The defer mechanism is useful for paired operations, where one operation is performed at the start of a code block and the paired operation is performed before exiting the block. Because blocks can be exited using a variety of mechanisms, operations are frequently paired incorrectly. The defer mechanism in C is intended to help ensure the proper pairing of these operations. This pattern is common in resource management, synchronization, and outputting balanced strings (e.g., parenthesis or HTML). A separable feature of the defer mechanism is a panic/recover mechanism that allows error handling at a distance.
Fichier non déposé

Dates et versions

hal-02953399 , version 1 (30-09-2020)

Identifiants

  • HAL Id : hal-02953399 , version 1

Citer

Aaron Ballman, Alex Gilding, Jens Gustedt, Tom Scogland, Robert C. Seacord, et al.. Defer Mechanism for {C}. ISO TC1/SC22/WG14, pp.57, 2020. ⟨hal-02953399⟩
78 Consultations
0 Téléchargements

Partager

Gmail Facebook X LinkedIn More