[ Engines and Threads | Reference Manual | Alphabetic Index ]

# engine_self(-Engine)

Get a handle of the engine executing the call

Engine
  Output: engine handle

## Description

Gets a handle of the engine executing the call. This handle can be used like the handles returned from engine_create/2, i.e. all operations that are defined for engine handles. Note that holding a reference to an engine can prevent it from being garbage collected.

### Modes and Determinism

- engine_self(-) is det

## Examples

        ?- engine_self(E), get_engine_property(E, status, S).
        E = $&(engine,"5ce9")
        S = running
        Yes (0.00s cpu)

## See Also

engine_create / 2, engine_resume / 3, get_engine_property / 3