Skip to content

Commit 90e2512

Browse files
committed
add comment on usage of usafe.
1 parent 35cba15 commit 90e2512

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sips/pending/_posts/2013-05-31-improved-lazy-val-initialization.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ This implementation has the following advantages compared to previous version:
514514

515515
Some disadvantages:
516516
- the `Unsafe` class, used internally has a disadvantage that it can be disallowed with a custom `SecurityManager`.
517+
Note that this class is extracted from other place in standard library that uses it: scala.concurrent.util.Unsafe.instance
517518
- it requires usage of `identityHashCode` that is stored for every object inside object header.
518519
- as global arrays are used to store monitors, seemingly unrelated things may create contention. This is addressed in detail in evaluation section.
519520

0 commit comments

Comments
 (0)