All Manuals > LispWorks User Guide and Reference Manual > 32 The COMM Package

NextPrevUpTopContentsIndex

async-io-state-abort

Function
Summary

Stops I/O and callbacks on an async-io-state and calls an abort callback.

Package

comm

Signature

async-io-state-abort async-io-state abort-callback &optional direction

Arguments

async-io-state

An async-io-state.

abort-callback

A function designator.

direction

One of the keywords :input, :output and :io.

Values

None.

Description

The function async-io-state-abort stops further I/O and calls to any callbacks for direction direction in async-io-state and asynchronously calls abort-callback with the same arguments that the callback for a running operation would be called, except when direction is :io, when the callback is called with the state only.

The default value of direction is :input.

If by the time abort-callback is called there is no active operation, then abort-callback is called with async-io-state and nil for the other arguments.

If async-io-state-abort is called while a callback is running, its effect is delayed until the callback returns.

abort-callback can do what the other callbacks can do. In particular, it can reuse async-io-state, and when it aborts async-io-state-read-with-checking it can decide how much of the buffered data to discard by calling async-io-state-discard.

Notes

Due to the asynchronous delay between the time that async-io-state-abort is called and the time that abort-callback is called, the callback of the operation may have already been called, so if the abort-callback does anything except closing async-io-state it will normally have to check the state's async-io-state-read-status.

See also

async-io-state-abort-and-close
The Async-I/O-State API


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex