Skip to content

Commit

Permalink
set the proper number of minimum threads this time
Browse files Browse the repository at this point in the history
  • Loading branch information
etorreborre committed Jul 16, 2017
1 parent 0ab8bf5 commit 0673e58
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ object ExecutionEnv {

/**
* the number of executors is set from the arguments.threadsNb value which is
* Runtime.getRuntime.availableProcessors by default
* min(Runtime.getRuntime.availableProcessors, 4) by default
*/
def executor(threadsNb: Int, name: String): ExecutorService =
Executors.newFixedThreadPool(threadsNb, NamedThreadFactory("specs2.fixed."+name))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ case class ExecutorServices(executorServiceEval: Evaluated[ExecutorService],

object ExecutorServices {

lazy val threadsNb = math.min(Runtime.getRuntime.availableProcessors, 4)
lazy val threadsNb = math.max(Runtime.getRuntime.availableProcessors, 4)

def create(implicit es: ExecutorService, s: ScheduledExecutorService): ExecutorServices =
fromExecutorServices(es, s)
Expand Down
11 changes: 11 additions & 0 deletions notes/3.9.4.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Maintenance version (3.9.3 was incorrect)

## Improvements

* **core** when checking for the equality of 2 sets of lines only run the edit distance difference on them if they are different.
this improves build times

## Fixes

* **core** set the minimum number of execution threads to 4 to avoid possible deadlocks on single core machines (cf some CI environments)
* **core** use the "user" execution environment to execute examples instead of specs2 own execution environment
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "3.9.3"
version in ThisBuild := "3.9.4"

0 comments on commit 0673e58

Please sign in to comment.