Skip to content

Commit

Permalink
Add comment explaning synchronization.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwhite committed Sep 4, 2018
1 parent b6858f4 commit fce66a5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ public GenotypeLikelihoodCalculator getInstance(final int ploidy, final int alle
}

/**
* Update of shared tables
* Update of shared tables. Note that this method is synchronized to avoid race conditions in Spark. This is because
* in Spark each region has its own HaplotypeCallerEngine instance (so there can be multiple instances in a single
* JVM), but these share a single (static) instance of this class (via AlleleSubsettingUtils).
*
* @param requestedMaximumAllele the new requested maximum allele maximum.
* @param requestedMaximumPloidy the new requested ploidy maximum.
Expand Down

0 comments on commit fce66a5

Please sign in to comment.