scala / scala-parallel-collections

Parallel collections standard library module for Scala 2.13+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

toParArray (and friends) is not accessible

gzm0 opened this issue · comments

toParArray cannot be called on non-parallel collections anymore, since they do not extend the Gen-family.

For example:

import CollectionConverters._

Seq(1, 2, 3).toParArray

fails to compile.

They do extend GenTraversableOnce. You have to import scala.collection.parallel.CollectionsHaveToParArray to get the conversion, same as in 2.12.

We should consider moving this into CollectionConverters though.

Hmmm... Not sure what I missed there.

In the end we worked around toParArray (and in the process removed some unnecessary copies). But thanks for getting back anyways.