10.6.2 Using Prolog engines from C
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Multithreaded applications
        • Multithreaded mixed C and Prolog applications
          • Using Prolog engines from C
            • PL_current_engine()
            • PL_create_engine()
            • PL_destroy_engine()
            • PL_set_engine()
            • PL_WITH_ENGINE()
    • Packages
Availability:C-language interface function
void PL_WITH_ENGINE(PL_engine_t e)
This macro implements a C for-loop where the body is executed with the engine e as current engine. The body is executed exactly once. After completion of the body the current engine of the calling thread is restored to old state (either the old current engine or no engine). The user may use break to terminate the body early. The user may not use return. Using return does not reset the old engine.