Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Unified Diff: sdk/lib/core/set.dart

Issue 27308003: Document that concurrent modification is bad, m'kay. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cannot be misread as iterating changing the length. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/core/map.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/set.dart
diff --git a/sdk/lib/core/set.dart b/sdk/lib/core/set.dart
index 80ffd167e3b13af86230807998ea4ef8b331cd42..f8af64c95f67ab3349dad15bdadf20668669bfe0 100644
--- a/sdk/lib/core/set.dart
+++ b/sdk/lib/core/set.dart
@@ -19,6 +19,12 @@ part of dart.core;
* Sets may be either ordered or unordered. [HashSet] is unordered and doesn't
* guarantee anything about the order that elements are accessed in by
* iteration. [LinkedHashSet] iterates in the insertion order of its elements.
+ *
+ * It is generally not allowed to modify the set (add or remove elements) while
+ * an operation on the set is being performed, for example during a call to
+ * [forEach] or [containsAll]. Nor is it allowed to modify the set while
+ * iterating either the set itself or any `Iterable` that is backed by the set,
+ * such as the ones returned by methods like [where] and [map].
*/
abstract class Set<E> extends IterableBase<E> implements EfficientLength {
/**
« no previous file with comments | « sdk/lib/core/map.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698