send
send — transmits expressions for evaluation.
send (task, s_exp)
taskA task descriptor as assigned to a locate_task call.
s_expAny Gamma or Lisp expression.
A result depending on the receiving task, which could include:
This function constructs an ASCII string representing the
s_exp and transmits it via synchronous
interprocess communication to the receiving task. The
task processes the message and returns a result
based on that processing. If the task is another
Gamma process, the message will be interpreted as a Gamma expression and
evaluated. The return value will be the result of that evaluation.
Task 1:
Gamma>init_ipc ("a","a");tGamma>tsk = locate_task("b",nil);#<Task:9751>Gamma>send(tsk, #princ("hello\n"));hello tGamma>send_async(tsk, #princ(cos(5), "\n"));tGamma>send(tsk, #princ("goodbye\n"));tGamma>
Task 2:
Gamma>init_ipc ("b","b");tGamma>while(t) next_event();hello 0.28366218546322624627 goodbye
isend, locate_task, send_async, send_string, send_string_async