Skip to content

Commit

Permalink
Merge pull request #7 from ryan-williams/rel
Browse files Browse the repository at this point in the history
make ContigNames map concurrent
  • Loading branch information
ryan-williams committed Feb 5, 2017
2 parents 02e346f + be5216a commit 137f9dc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
organization := "org.hammerlab.genomics"
name := "reference"
version := "1.2.0"
version := "1.2.1"

// This branch only builds against Scala 2.11.x.

Expand Down
3 changes: 2 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
addSbtPlugin("org.hammerlab" % "sbt-parent" % "1.6.1")
resolvers ++= Seq(Resolver.sonatypeRepo("releases"), Resolver.sonatypeRepo("snapshots"))
addSbtPlugin("org.hammerlab" % "sbt-parent" % "1.6.3")
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.hammerlab.genomics.reference

import scala.collection.mutable
import scala.collection.concurrent

/**
* Implicit-value-class wrapper for strings representing names of contigs.
Expand Down Expand Up @@ -49,7 +49,8 @@ class ContigName private(val name: String)
*/
object ContigName {

private[reference] val names = mutable.Map[String, ContigName]()
// Can be accessed by multiple threads at once.
private[reference] val names = concurrent.TrieMap[String, ContigName]()

// Map from string contig name to ordered rank.
private[reference] val map: Map[String, Int] =
Expand Down

0 comments on commit 137f9dc

Please sign in to comment.