CountQueuingStrategy: highWaterMark-Eigenschaft
Hinweis: Diese Funktion ist in Web Workers verfügbar.
Die schreibgeschützte CountQueuingStrategy.highWaterMark
-Eigenschaft gibt die Gesamtzahl der Blöcke zurück, die in der internen Warteschlange enthalten sein können, bevor der Gegendruck angewendet wird.
Werte
Ein ganzzahliger Wert, der die Anzahl der Blöcke darstellt.
Beispiele
js
const queueingStrategy = new CountQueuingStrategy({ highWaterMark: 1 });
const readableStream = new ReadableStream(
{
start(controller) {
// …
},
pull(controller) {
// …
},
cancel(err) {
console.log("stream error:", err);
},
},
queuingStrategy,
);
const size = queuingStrategy.size(chunk);
console.log(`highWaterMark value: ${queuingStrategy.highWaterMark}$`);
Spezifikationen
Specification |
---|
Streams # ref-for-cqs-high-water-mark① |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
highWaterMark |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Siehe auch
CountQueuingStrategy()
Konstruktor