News for hackers. Stuff that matters.
Re:A Defer Mechanism for C by pjmlp on Tuesday December 15, 2020 @02:20AM (#25427849)
Sure you can, it just requires a little bit more syntax and following FP patters by making use of lambdas.

With lock() being a function taking a lambda.

    lock([]{
       // code locked with anonymous mutex
    });

There are no comments on this comment yet.