10.6.1 A Prolog thread for each native thread (one-to-one)
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Multithreaded applications
        • Multithreaded mixed C and Prolog applications
          • A Prolog thread for each native thread (one-to-one)
            • PL_thread_self()
            • PL_unify_thread_id()
            • PL_thread_attach_engine()
            • PL_thread_destroy_engine()
            • PL_thread_at_exit()
    • Packages
Availability:C-language interface function
int PL_thread_at_exit(void (*function)(void *), void *closure, int global)
Register a handle to be called as the Prolog engine is destroyed. The handler function is called with one void * argument holding closure. If global is TRUE, the handler is installed for all threads. Globally installed handlers are executed after the thread-local handlers. If the handler is installed local for the current thread only (global == FALSE) it is stored in the same FIFO queue as used by thread_at_exit/1.