send_async

send_async — transmits expressions asynchronously.

Syntax

send_async (task, s_exp)

		

Arguments

task

A task descriptor as assigned to a locate_task call.

s_exp

Any Gamma or Lisp expression.

Returns

t if the message was successfully delivered, otherwise nil.

Description

This function constructs a string representation of the given expression and delivers it via asynchronous interprocess communication to the receiving task. If the message could not be delivered, send_async returns nil. There is no indication of the status of the receiving task as a result of processing the message.

Example

Task 1:

Gamma> init_ipc ("a","a");
t
Gamma> tsk = locate_task("b",t);
#<Task:9751>
Gamma> send_async(tsk, #princ("hello, b\n"));
t
Gamma> send_async(tsk, #princ(cos(5), "\n"));
t
Gamma> 
		

Task 2:

Gamma> init_ipc ("b","b");
t
Gamma> while(t) next_event();
hello, b
0.28366218546322624627
		

See Also

isend, locate_task, send, send_string, send_string_async