avoid_openmp_hang_within_fork

C++ Function Reference

1 Signature

void avoid_openmp_hang_within_fork()

2 Call Graph

Function dependencies

3 Source Code

File: inst/include/Utilities/openme-utils.hppLines 266-271

inline void avoid_openmp_hang_within_fork() {
        // Called once on loading BigDataStatMeth from init.c
    #ifdef _OPENMP
        pthread_atfork(&when_fork, &after_fork, NULL);
    #endif
    }

4 Usage Example

#include "BigDataStatMeth.hpp"

// Example usage
auto result = avoid_openmp_hang_within_fork(...);