Skip to content

Commit b4b9fe5

Browse files
committed
Move original t5375 to pending
Needs to be replaced by something that doesn't use the parallel collections, I attempted to do so in b9ba16e but the result caused deadlocks, don't have time to investigate right now.
1 parent a553078 commit b4b9fe5

File tree

3 files changed

+19
-30
lines changed

3 files changed

+19
-30
lines changed
File renamed without changes.

tests/disabled/run/t5375.scala

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/** Hello fellow compiler developer.
2+
if you are wondering why does test suite hang on this test
3+
then it's likely that the lambda inside map has been compiled into static method
4+
unfotrunatelly, as it is executed inside static object initializer,
5+
it is executed inside class-loader, in a synchronized block that is not source defined.
6+
7+
If the lambda will be static Test$#foo, calling it through a different thread would require grabbing the
8+
lock inside classloader. Unlike if it not static and is called through This(Test).foo, no lock is grabbed.
9+
10+
@DarkDimius
11+
*/
12+
object Test extends App {
13+
val foos = (1 to 1000).toSeq
14+
try
15+
foos.par.map(i => if (i % 37 == 0) sys.error("i div 37") else i)
16+
catch {
17+
case ex: RuntimeException => println("Runtime exception")
18+
}
19+
}

tests/run/t5375.scala

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)