built-in predicate
threaded_engine_create/3
ï
Descriptionï
threaded_engine_create(AnswerTemplate, Goal, Engine)
Creates a new engine for proving the given goal and defines an answer template for retrieving the goal solution bindings. A message queue for passing arbitrary terms to the engine is also created. If the name for the engine is not given, a unique name is generated and returned. Engine names shall be regarded as opaque terms; users shall not rely on its type.
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.
Meta-predicate templateï
threaded_engine_create(*, 0, *)
Modes and number of proofsï
threaded_engine_create(@term, @callable, @nonvar) - one
threaded_engine_create(@term, @callable, --nonvar) - one
Errorsï
Goal
is a variable:instantiation_error
Goal
is neither a variable nor a callable term:type_error(callable, Goal)
Engine
is the name of an existing engine:permission_error(create, engine, Engine)
Examplesï
% create a new engine for finding members of a list:
| ?- threaded_engine_create(X, member(X, [1,2,3]), worker_1).