We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 172037a commit 64f5a0fCopy full SHA for 64f5a0f
reference-implementation/lib/abstract-ops/queue-with-sizes.js
@@ -39,15 +39,17 @@ exports.PeekQueueValue = container => {
39
return pair.value;
40
};
41
42
+const closingStepsSymbol = Symbol('closing-steps');
43
+
44
exports.ResetQueue = container => {
45
assert('_queue' in container && '_queueTotalSize' in container);
46
47
if (container._isOwning) {
48
while (container._queue.length > 0) {
49
const value = exports.DequeueValue(container);
- if (typeof value.close === 'function') {
50
+ if (typeof value[closingStepsSymbol] === 'function') {
51
try {
- value.close();
52
+ value[closingStepsSymbol]();
53
} catch (closeException) {
54
// Nothing to do.
55
}
0 commit comments