Availability::- use_module(library(pce)).
(can be autoloaded)
[semidet]in_pce_thread_sync(:Goal)Same as in_pce_thread/1,
but wait for Goal to be completed. Success depends on the
success of executing Goal. Variable bindings inside Goal
are visible to the caller, but it should be noted that the values are
being copied. If Goal throws an exception, this
exception is re-thrown by in_pce_thread/1.
If the calling thread is the‘pce thread’, in_pce_thread_sync/1
executes a direct meta-call. See also in_pce_thread/1.
Note that in_pce_thread_sync/1
is expensive because it requires copying and thread communication. For
example, in_pce_thread_synctrue
runs at approximately
50,000 calls per second (AMD Phenom 9600B, Ubuntu 11.04).