10.6.1 A Prolog thread for each native thread (one-to-one)
All Application Manual Name SummaryHelp

  • 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
bool PL_thread_at_exit(void (*function)(void *), void *closure, bool 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.