close_task

Gamma: Version 4.0
Prev |  | Next

# `close_task`

`close_task` -- closes a task opened by `locate_task`.

## Syntax

    close_task (task)

## Arguments

`task`

  A task descriptor as assigned to a `locate_task` call.

## Returns

t if the task could be closed, else nil.

## Description

When a task is opened (located) for interprocess communication, a communication link may be established. This link must be cleaned up if it is to be re-used. There is no hard limit to the number of tasks which may be open with QNX 4 message passing, but TCP/IP exerts an operating system-dependent limit on the number of simultaneously open tasks. Tasks will automatically be closed by the garbage collector when they are no longer referenced.

## Example

        Gamma> task = locate_task("Task 1",nil);
        #<Task:9684>
        Gamma> close_task(task);
        t
        Gamma>

See the Starting Programs section of the Common Functions chapter (Tutorial One), or the Starting Programs section of the Common Functions for Any Program chapter (Tutorial Two), or the Common: Controlling the Cascade TextLogger section of the Log Functions chapter in the Cogent Tools Demo and Tutorials book for examples of this function used in context.

## See Also

`locate_task`

Prev | Home | Next
`add_hook` | Up | `_destroy_task`

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