How to identify / get automated hints with cyclic object initialization causing deadlocks in Scala?
问题 The following code runs into future timeouts (in Scala 2.x and Dotty, -Xcheckinit or -Ycheck-init does not help here) because of cyclic object initialization. In complex projects these cycles usually are hidden very well. Is there any possiblity of getting help from the compiler or at least at runtime? How do you prevent this from happening in a multithreaded environment? import scala.concurrent.Future import scala.concurrent._ import scala.concurrent.duration._ import scala.concurrent