File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
core/src/main/scala/scala/collection/parallel
junit/src/test/scala/scala/collection/parallel Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -550,7 +550,11 @@ extends IterableOnce[T @uncheckedVariance]
550550 def apply () = shared
551551 def doesShareCombiners = true
552552 } else new CombinerFactory [T , Repr ] {
553- def apply () = newCombiner
553+ def apply () = {
554+ val r = newCombiner
555+ r.combinerTaskSupport = tasksupport
556+ r
557+ }
554558 def doesShareCombiners = false
555559 }
556560 }
@@ -563,7 +567,11 @@ extends IterableOnce[T @uncheckedVariance]
563567 def apply () = shared
564568 def doesShareCombiners = true
565569 } else new CombinerFactory [S , That ] {
566- def apply () = cbf()
570+ def apply () = {
571+ val r = cbf()
572+ r.combinerTaskSupport = tasksupport
573+ r
574+ }
567575 def doesShareCombiners = false
568576 }
569577 }
Original file line number Diff line number Diff line change @@ -39,4 +39,13 @@ class TaskTest {
3939
4040 for (x <- one ; y <- two) assertEquals(" two" , Thread .currentThread.getName)
4141 }
42+
43+ @ Test
44+ def `t152 pass on task support` (): Unit = {
45+ val myTs = new ExecutionContextTaskSupport ()
46+ val c = List (1 ).par
47+ c.tasksupport = myTs
48+ val r = c.filter(_ != 0 ).map(_ + 1 )
49+ assertSame(myTs, r.tasksupport)
50+ }
4251}
You can’t perform that action at this time.
0 commit comments