Generic FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

device-close

Arguments: stream abort

Called by close as its implementation. An around method first clears the output-buffer of the stream using either force-output (if abort is nil) or clear-output (if abort is t) The primary method then actually breaks the connection with the device, and the around method sets any external file or window handles or descriptors in the stream object to nil, to ensure that they are never used again due to this stream, and also marks the stream as closed, so that CL data-movement stream functions such as read-byte/read-char and write-byte/write-char cannot proceed on the now-closed stream.

device-close must always succeed (i.e. it must never return a failure code or call error), and it cannot take excessive time to perform its job. If it fails to break the connection within a clock tick or some reasonably small time, it gives up and returns with no further action. Leakage of file descriptor or window handles is possible in this case.

Defined methods

In addition to the described around method:

See streams.htm for information on the simple-streams implementation in Allegro CL. The older but still supported Gray streams implementation is described in gray-streams.htm.


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version