Skip to content

Commit 0673e58

Browse files
committed
set the proper number of minimum threads this time
1 parent 0ab8bf5 commit 0673e58

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

common/src/main/scala/org/specs2/concurrent/ExecutionEnv.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ object ExecutionEnv {
5757

5858
/**
5959
* the number of executors is set from the arguments.threadsNb value which is
60-
* Runtime.getRuntime.availableProcessors by default
60+
* min(Runtime.getRuntime.availableProcessors, 4) by default
6161
*/
6262
def executor(threadsNb: Int, name: String): ExecutorService =
6363
Executors.newFixedThreadPool(threadsNb, NamedThreadFactory("specs2.fixed."+name))

common/src/main/scala/org/specs2/control/eff/ExecutorServices.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ case class ExecutorServices(executorServiceEval: Evaluated[ExecutorService],
3535

3636
object ExecutorServices {
3737

38-
lazy val threadsNb = math.min(Runtime.getRuntime.availableProcessors, 4)
38+
lazy val threadsNb = math.max(Runtime.getRuntime.availableProcessors, 4)
3939

4040
def create(implicit es: ExecutorService, s: ScheduledExecutorService): ExecutorServices =
4141
fromExecutorServices(es, s)

notes/3.9.4.markdown

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Maintenance version (3.9.3 was incorrect)
2+
3+
## Improvements
4+
5+
* **core** when checking for the equality of 2 sets of lines only run the edit distance difference on them if they are different.
6+
this improves build times
7+
8+
## Fixes
9+
10+
* **core** set the minimum number of execution threads to 4 to avoid possible deadlocks on single core machines (cf some CI environments)
11+
* **core** use the "user" execution environment to execute examples instead of specs2 own execution environment

version.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version in ThisBuild := "3.9.3"
1+
version in ThisBuild := "3.9.4"

0 commit comments

Comments
 (0)