send_async

Gamma: Version 4.0
Prev |  | Next

# `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 the Sending Messages section of the Common Functions for Any Program chapter (Tutorial Two) in the Cogent Tools Demo and Tutorials book for an example of this function used in context.

## See Also

`isend`, `locate_task`, `send`, `send_string`, `send_string_async`

Prev | Home | Next
`send` | Up | `send_string`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.