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

async-io-state-abort Function


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




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

A function designator.
One of the keywords :input, :output and :io.

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.


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 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

25.7.2 The Async-I/O-State API
25 TCP and UDP socket communication and SSL

LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:26