Logtalk reference manual
Built-in predicate: threaded_discard/1

threaded_discard/1

Description

threaded_discard(Goal)

Discards discard any matching results of proving Goal in a new thread that might be already waiting to be retrieved. This call succeeds. Morevover, this call does not blocks execution waiting for a reply to be sent to the this thread by the thread executing the goal.

Template and modes

threaded_discard(+callable)

Errors

Goal is a variable:
instantiation_error
Goal is neither a variable nor a callable term:
type_error(callable, Goal)

Examples

To discard asynchronous goal proof results:
threaded_discard(Goal)
To discard asynchronous self message results:
threaded_discard(::Goal)
To discard asynchronous message results:
threaded_discard(Object::Goal)