send (task, s_exp)
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"); t Gamma> tsk = locate_task("b",nil); #<Task:9751> Gamma> send(tsk, #princ("hello\n")); hello t Gamma> send_async(tsk, #princ(cos(5), "\n")); t Gamma> send(tsk, #princ("goodbye\n")); t Gamma>
Task 2:
Gamma> init_ipc ("b","b");
t
Gamma> while(t) next_event();
hello
0.28366218546322624627
goodbye
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.