• Re: 10 ^ N

    From Paavo Helde@21:1/5 to All on Thu Apr 11 15:49:10 2024
    11.04.2024 12:05 Bonita Montero kirjutas:
    I tried to use futexes for my pow10-function.
    Is the usage correct ?

    Maybe, but it's not needed and makes the code more complex, redundant
    and potentially a bit slower.

    C++ statics' initialization is guaranteed to be thread-safe since C++11.
    Just put your initialization logic into a separate function and use this
    for initializing your static variable. C++ will perform any needed
    multi-thread locking automatically, adding ones own explicit locks will
    not make it faster.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)