Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengruifeng committed Oct 11, 2024
1 parent 254f830 commit 80f26cb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/src/main/scala/org/apache/spark/util/Lazy.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ package org.apache.spark.util
* (in our case, this was the logger). This causes scala to also try to grab a coarse lock on
* the parent object.
* c) If thread 1 waits for thread 2 to join, a deadlock occurs.
* The main difference between this and [[LazyTry]] is that this does not cache failures.
*
* @note
* Scala 3 uses a different implementation of lazy vals which doesn't have this problem.
* Please refer to <a
* href="https://docs.scala-lang.org/scala3/reference/changed-features/lazy-vals-init.html">Lazy
* Vals Initialization</a> for more details.
*/
private[spark] class Lazy[T](initializer: => T) extends Serializable {

Expand Down

0 comments on commit 80f26cb

Please sign in to comment.