In jpl.c there is a call
What does that do?
|Did you know ...||Search Documentation:|
NULLthe current engine associated with the calling thread is stored at the given location. If engine equals
PL_ENGINE_MAINthe initial engine is attached to the calling thread. If engine is
PL_ENGINE_CURRENTthe engine is not changed. This can be used to query the current engine. This call returns
PL_ENGINE_SETif the engine was switched successfully,
PL_ENGINE_INVALif engine is not a valid engine handle and
PL_ENGINE_INUSEif the engine is currently in use by another thread.
Engines can be changed at any time. For example, it is allowed to
select an engine to initiate a Prolog goal, detach it and at a later
moment execute the goal from another thread. Note, however, that the
fid_t types are
interpreted relative to the engine for which they are created. Behaviour
when passing one of these types from one engine to another is undefined.
In the single-threaded version this call only succeeds if engine refers to the main engine.