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

Unified Diff: sdk/lib/core/iterable.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/collection/queue.dart ('k') | sdk/lib/core/list.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/iterable.dart
diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart
index 42ecd46652decb7d73fd399d9ac41332770d25e3..2db8b99da2ff27e5286569bb41d44d33cc7ea2b6 100644
--- a/sdk/lib/core/iterable.dart
+++ b/sdk/lib/core/iterable.dart
@@ -25,6 +25,11 @@ part of dart.core;
* You can implement Iterable in your own class.
* If you do, then an instance of your Iterable class
* can be the right-hand side of a for-in construct.
+ *
+ * Some subclasss of `Iterable` can be modified. It is generally not allowed
+ * to modify such collections while they are being iterated. Doing so will break
+ * the iteration, which is typically signalled by throwing a
+ * [ConcurrentModificationError] when it is detected.
*/
abstract class Iterable<E> {
const Iterable();
« no previous file with comments | « sdk/lib/collection/queue.dart ('k') | sdk/lib/core/list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698