tyos
This commit is contained in:
parent
21ca8eccec
commit
4deb28e4c6
@ -257,10 +257,9 @@ call(X,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11) :- '$execute'(X,A1,A2,A3,A4,A5,A6,A7,
|
|||||||
|
|
||||||
/** @pred call_cleanup(: _Goal_, : _CleanUpGoal_)
|
/** @pred call_cleanup(: _Goal_, : _CleanUpGoal_)
|
||||||
|
|
||||||
This is similar to <tt>call_cleanup/1</tt> with an additional
|
This is similar to call_cleanup/1 but with an additional
|
||||||
_CleanUpGoal_ which gets called after _Goal_ is finished.
|
_CleanUpGoal_ which gets called after _Goal_ is finished.
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
call_cleanup(Goal, Cleanup) :-
|
call_cleanup(Goal, Cleanup) :-
|
||||||
setup_call_catcher_cleanup(true, Goal, _Catcher, Cleanup).
|
setup_call_catcher_cleanup(true, Goal, _Catcher, Cleanup).
|
||||||
@ -271,14 +270,15 @@ call_cleanup(Goal, Catcher, Cleanup) :-
|
|||||||
/** @pred setup_call_cleanup(: _Setup_,: _Goal_, : _CleanUpGoal_)
|
/** @pred setup_call_cleanup(: _Setup_,: _Goal_, : _CleanUpGoal_)
|
||||||
|
|
||||||
|
|
||||||
Calls `(Setup, Goal)`. For each sucessful execution of _Setup_, calling _Goal_, the
|
Calls `(Setup, Goal)`. For each sucessful execution of _Setup_,
|
||||||
cleanup handler _Cleanup_ is guaranteed to be called exactly once.
|
calling _Goal_, the cleanup handler _Cleanup_ is guaranteed to be
|
||||||
This will happen after _Goal_ completes, either through failure,
|
called exactly once. This will happen after _Goal_ completes, either
|
||||||
deterministic success, commit, or an exception. _Setup_ will
|
through failure, deterministic success, commit, or an exception.
|
||||||
contain the goals that need to be protected from asynchronous interrupts
|
_Setup_ will contain the goals that need to be protected from
|
||||||
such as the ones received from `call_with_time_limit/2` or thread_signal/2. In
|
asynchronous interrupts such as the ones received from
|
||||||
most uses, _Setup_ will perform temporary side-effects required by
|
`call_with_time_limit/2` or thread_signal/2. In most uses, _Setup_
|
||||||
_Goal_ that are finally undone by _Cleanup_.
|
will perform temporary side-effects required by _Goal_ that are
|
||||||
|
finally undone by _Cleanup_.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user