executes the specified goal on a remote process
INCLUDE 'sysman.h' exec(Goal) alloc_server(ServerID), exec(ServerID,Goal)
exec(Goal) (i) exec(ServerID,Goal) (i,i)
void(Goal) (i) Goal to be executed
server(ServerID) Process on which Goal is executed
A server is allocated if ServerID is only partially initialised, unbound, or
not provided. The Goal is called on that server, but no results are returned.
When the goal finally fails, the process is returned to the public server pool.
To receive results, you have to use the send_msg
(), rec_msg () predicates.
This predicate allows you to create any asynchronous communication scheme. Please consult the
Language Tutorial for a detailed description.
NOTE: exec uses the call () predicate, thus
the same restrictions apply!
get_my_id(MyID), exec(Server,( something(Results), send_msg(MyID,Results))), something_else, rec_msg(Server,Answer).
No runtime errors. If a server is to be allocated, the process might suspend if no
server is available.
This may cause deadlocks!
client-server
alloc_server , call , xcall , dcall , send_msg , rec_msg