built-in predicate
threaded_engine_self/1
ï
Descriptionï
threaded_engine_self(Engine)
Queries the name of engine calling the predicate. Fails if not called from within an engine or if the argument doesnât unify with the engine name.
Note
This predicate requires a backend Prolog compiler providing
compatible multi-threading primitives. The value of the read-only
engines flag is set to supported
when that
is the case.
Modes and number of proofsï
threaded_engine_self(?nonvar) - zero_or_one
Errorsï
(none)
Examplesï
% find the name of the engine making the query:
..., threaded_engine_self(Engine), ...
% check if the the engine making the query is worker_1:
..., threaded_engine_self(worker_1), ...