2.4.2 Clients
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • Transparent Inter-Process Communications (TIPC) libraries
        • The TIPC libraries: library(tipc/...)
          • library(tipc/tipc_linda): A Process Communication Interface
            • Clients
              • linda/0
              • linda/1
              • linda_client/1
              • close_client/0
              • linda_timeout/2
              • linda_timeout/1
              • out/1
              • in/1
              • in_noblock/1
              • in/2
              • rd/1
              • rd_noblock/1
              • rd/2
              • bagof_in_noblock/3
              • bagof_rd_noblock/3
              • linda_eval/1
              • linda_eval/2
              • linda_eval_detached/1
              • linda_eval_detached/2
              • tuple/1
              • tuple/2
              • tipc_linda_server/0
              • tipc_initialize/0
Availability::- use_module(library(tipc/tipc_linda)).
[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.