[det]tuple(:Goal)
[det]tuple(?Head,
:Goal)registers Head as a virtual tuple in TIPC Linda's tuple
space. On success, any client on the cluster may reference the tuple, Head,
using rd/1 or rd_noblock/1.
On reference, Goal is executed by a separate thread of
execution in the host client's Prolog process. The result is unified
with Head, which is then returned to the guest client. As in
linda_eval/(1-2) above, Goal is evaluated using forall/2.
The virtual tuple is unregistered on backtracking into a tuple/(1-2),
receipt of uncaught exception, or cut of choice-points. In tuple/1,
Head and Goal are identical, except that the
module name is stripped from Head.
Note: A virtual tuple is an extension of the server. Even
though it is operating in the client's Prolog environment, it is
restricted in the server operations that it may perform. It is generally
safe for tuple predicates to perform out/1
operations, but it is unsafe for them to perform any variant of in
or rd
, either directly or indirectly. This restriction is
however, relaxed if the server and client are operating in separate
heavyweight processes (not threads) on the node or cluster. This is most
easily achieved by starting a stand-alone Linda server somewhere on the
cluster. See
tipc_linda_server/0,
below.