Merge pull request #2538 from joaquinelio/patch-7

typo
This commit is contained in:
Ilya Kantor 2021-03-26 08:25:42 +03:00 committed by GitHub
commit 0ec6e0c086
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,7 @@ messages.shift();
// now readMessages has 1 element (technically memory may be cleaned later) // now readMessages has 1 element (technically memory may be cleaned later)
``` ```
The `WeakSet` allows to store a set of messages and easily check for the existance of a message in it. The `WeakSet` allows to store a set of messages and easily check for the existence of a message in it.
It cleans up itself automatically. The tradeoff is that we can't iterate over it, can't get "all read messages" from it directly. But we can do it by iterating over all messages and filtering those that are in the set. It cleans up itself automatically. The tradeoff is that we can't iterate over it, can't get "all read messages" from it directly. But we can do it by iterating over all messages and filtering those that are in the set.