summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/immutable/List.scala
diff options
context:
space:
mode:
authorStefan Zeiger <szeiger@novocode.com>2016-08-08 20:56:07 +0200
committerStefan Zeiger <szeiger@novocode.com>2016-08-12 17:58:28 +0200
commita52882333e0d690304d0c49a89a0725d0934f43a (patch)
tree3179a6e9ae23262711a47cd0d8a8b3152a04bbad /src/library/scala/collection/immutable/List.scala
parent25b29ea4036b0bc910a5eb07d64c93d294be4e55 (diff)
downloadscala-a52882333e0d690304d0c49a89a0725d0934f43a.tar.gz
scala-a52882333e0d690304d0c49a89a0725d0934f43a.tar.bz2
scala-a52882333e0d690304d0c49a89a0725d0934f43a.zip
SI-7838 Document the multi-threading semantics of List and Vector
Making them completely thread-safe would be too expensive (in terms of performance of single-threaded use cases).
Diffstat (limited to 'src/library/scala/collection/immutable/List.scala')
-rw-r--r--src/library/scala/collection/immutable/List.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/library/scala/collection/immutable/List.scala b/src/library/scala/collection/immutable/List.scala
index c09328cae6..45b761fc00 100644
--- a/src/library/scala/collection/immutable/List.scala
+++ b/src/library/scala/collection/immutable/List.scala
@@ -25,6 +25,8 @@ import java.io.{ObjectOutputStream, ObjectInputStream}
* This class is optimal for last-in-first-out (LIFO), stack-like access patterns. If you need another access
* pattern, for example, random access or FIFO, consider using a collection more suited to this than `List`.
*
+ * $usesMutableState
+ *
* ==Performance==
* '''Time:''' `List` has `O(1)` prepend and head/tail access. Most other operations are `O(n)` on the number of elements in the list.
* This includes the index-based lookup of elements, `length`, `append` and `reverse`.