Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Parallel collections standard library module for Scala 2.13+

License

NotificationsYou must be signed in to change notification settings

scala/scala-parallel-collections

Repository files navigation

This Scala standard module contains the packagescala.collection.parallel, with all of the parallel collections thatused to be part of the Scala standard library (in Scala 2.10 through 2.12).

For Scala 3 and Scala 2.13, this module is a separate JAR that can beomitted from projects that do not use parallel collections.

Documentation

Maintenance status

This module is community-maintained, under the guidance of the Scala team at Akka. If you areinterested in participating, please jump right in on issues and pullrequests.

Usage

To depend on scala-parallel-collections in sbt, add this to yourbuild.sbt:

libraryDependencies+="org.scala-lang.modules"%%"scala-parallel-collections"%"<version>"

In your code, adding this import:

importscala.collection.parallel.CollectionConverters._

will enable use of the.par method as in earlier Scala versions.

Cross-building: dependency

This module is published only for the Scala 3 and 2.13, so in across-built project, the dependency should take this form:

libraryDependencies++= {CrossVersion.partialVersion(scalaVersion.value)match {caseSome((2, major))if major<=12=>Seq()case _=>Seq("org.scala-lang.modules"%%"scala-parallel-collections"%"<version>")  }}

This way of testingscalaVersion is robust across varying Scalaversion number formats (nightlies, milestones, release candidates,community build, etc).

Cross-building: source compatibility

Using.par is problematic in a cross-built project, since in Scala2.13+ theCollectionConverters._ import shown above is necessary, butin earlier Scala versions, that import will not compile.

You may able to avoid the problem by directly constructing yourparallel collections rather than going through.par. For otherpossible workarounds, see#22,which is still under discussion.

Releasing

As with other Scala standard modules, build and release infrastructureis provided by thesbt-scala-module sbtplugin.

About

Parallel collections standard library module for Scala 2.13+

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors52

Languages


[8]ページ先頭

©2009-2025 Movatter.jp