diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-05-26 22:47:10 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-05-26 23:22:09 +0200 |
commit | 4007910927bf494c917ac1ffcbf8b73783541247 (patch) | |
tree | 7ec1cd76b34cc054e286d13551f5fc29b5b04e71 /tests | |
parent | f85663af4badc25cc5645fb811c616055e2702bb (diff) | |
download | dotty-4007910927bf494c917ac1ffcbf8b73783541247.tar.gz dotty-4007910927bf494c917ac1ffcbf8b73783541247.tar.bz2 dotty-4007910927bf494c917ac1ffcbf8b73783541247.zip |
Fix deadlock in t5375 and similar tests.
See t5375.scala for details.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run/t5375.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/run/t5375.scala b/tests/run/t5375.scala index 8c2c06fde..d8413c1a3 100644 --- a/tests/run/t5375.scala +++ b/tests/run/t5375.scala @@ -1,3 +1,14 @@ +/** Hello fellow compiler developer. + if you are wondering why does test suite hang on this test + then it's likely that the lambda inside map has been compiled into static method + unfotrunatelly, as it is executed inside static object initializer, + it is executed inside class-loader, in a synchronized block that is not source defined. + + If the lambda will be static Test$#foo, calling it through a different thread would require grabbing the + lock inside classloader. Unlike if it not static and is called through This(Test).foo, no lock is grabbed. + + @DarkDimius +*/ object Test extends dotty.runtime.LegacyApp { val foos = (1 to 1000).toSeq try |