Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
releaseLock()
The releaseLock()
method of the
ReadableStreamDefaultReader interface releases the reader’s lock on the stream.
If the associated stream is errored as the lock is released, the reader will be errored as well. This method is useful when you’re done with the stream and want to release the lock on it.
If the reader’s lock is released as pending read operations are still in progress, the reader’s
ReadableStreamDefaultReader.read() calls are immediately rejected with a TypeError
.