Logtalk reference manual
Built-in predicate: threaded_exit/1

threaded_exit/1

Description

threaded_exit(Goal)

Retrieve the result of proving Goal in a new thread. This call blocks execution until the reply is sent to the this thread by the thread executing the goal. This predicate is non-deterministic, providing access to any alternative solutions of its argument.

Template and modes

threaded_exit(+callable)

Errors

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

Examples

To retrieve an asynchronous goal proof result:
threaded_exit(Goal)
To retrieve an asynchronous message to self result:
threaded_exit(::Goal)
To retrieve an asynchronous message result:
threaded_exit(Object::Goal)