Logtalk reference manual
Predicate directive: atomic/1

atomic/1

Description

atomic(Functor/Arity)
atomic(Functor1/Arity1, Functor2/Arity2, ...)
atomic([Functor1/Arity1, Functor2/Arity2, ...])

atomic(Functor//Arity)
atomic(Functor1//Arity1, Functor2//Arity2, ...)
atomic([Functor1//Arity1, Functor2//Arity2, ...])

Declares atomic predicates and atomic grammar rule non-terminals. The execution of an atomic predicate (or atomic non-terminal) is protected by a mutex in order to allow for thread synchronization when proving a call to the predicate (or non-terminal).

Template and modes

atomic(+predicate_indicator_term)
atomic(+non_terminal_indicator_term)

Examples

:- atomic(db_update/1).

:- atomic(write_stream/2, write_stream/2).

:- atomic([add_to_queue/2, remove_from_queue/2]).