Skip to content

Commit

Permalink
Merge 9b203b2 into bdb83b3
Browse files Browse the repository at this point in the history
  • Loading branch information
andresilva committed Nov 23, 2019
2 parents bdb83b3 + 9b203b2 commit aa775a1
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 26 deletions.
22 changes: 10 additions & 12 deletions .travis.yml
@@ -1,17 +1,15 @@
language: scala
scala:
- 2.12.4
- 2.11.11
- 2.10.6
- 2.13.1
- 2.12.10
- 2.11.12
jdk:
- oraclejdk8
- oraclejdk7
- openjdk7
- openjdk8
- openjdk11
matrix:
exclude:
- scala: 2.12.4
jdk: oraclejdk7
- scala: 2.12.4
include:
- dist: trusty
scala: 2.11.12
jdk: openjdk7
script:
- sbt ++$TRAVIS_SCALA_VERSION "set concurrentRestrictions in Global := Seq(Tags.limit(Tags.Test, 1))" clean coverage test
Expand All @@ -24,8 +22,8 @@ after_success:
>
if [[ $TRAVIS_BRANCH == 'master' && \
$TRAVIS_PULL_REQUEST == 'false' && \
$TRAVIS_JDK_VERSION == 'oraclejdk8' && \
$TRAVIS_SCALA_VERSION == "2.12.4" ]]; then
$TRAVIS_JDK_VERSION == 'openjdk8' && \
$TRAVIS_SCALA_VERSION == "2.13.1" ]]; then
export SBT_GHPAGES_COMMIT_MESSAGE="Auto-update site ($TRAVIS_COMMIT)"
sbt ++$TRAVIS_SCALA_VERSION ghpagesPushSite
fi
Expand Down
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -46,6 +46,13 @@ resolvers += Resolver.sonatypeRepo("snapshots")
Currently, the library has no external dependencies apart from the Java and Scala standard
libraries.

### JDK7 support

This library relies on features only available in Java 8 (`java.util.concurrent.atomic.LongAdder`),
the versions published on Sonatype are compiled with JDK 8. This library provides support for JVM 7
if it is compiled with JDK 7 (only for Scala 2.11). If you need to use this library on JVM 7 then
you should compile and package it yourself.

## Usage

The basic usage of the pool is shown below:
Expand Down
8 changes: 4 additions & 4 deletions build.sbt
Expand Up @@ -7,10 +7,10 @@ version := "0.5.0-SNAPSHOT"

scalaVersion := "2.13.1"

crossScalaVersions := Seq("2.11.12", "2.12.10")
crossScalaVersions := Seq("2.12.10", "2.11.12")

libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % "4.7.1" % "test")
"org.specs2" %% "specs2-core" % "4.8.1" % "test")

resolvers ++= Seq(
"snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
Expand All @@ -32,8 +32,8 @@ unmanagedSourceDirectories in Compile += {
val v = javaVersion.value
val dir = (sourceDirectory in Compile).value

if (v.startsWith("1.8")) dir / "java_8"
else dir / "java_7"
if (v.startsWith("1.7.")) dir / "java_7"
else dir / "java_8"
}

scalacOptions in Test ++= Seq("-Yrangepos")
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
@@ -1 +1 @@
sbt.version=0.13.16
sbt.version=0.13.18
14 changes: 7 additions & 7 deletions project/plugins.sbt
@@ -1,13 +1,13 @@
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.2")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.7")

addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.3.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.3.3")

addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3")

addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2")
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.3")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0")
3 changes: 1 addition & 2 deletions src/test/scala/io/github/andrebeat/pool/PoolSpec.scala
Expand Up @@ -2,7 +2,6 @@ package io.github.andrebeat.pool

import java.util.concurrent.BlockingQueue
import org.specs2.mutable.Specification
import scala.compat.Platform
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.{ blocking, Future }
import scala.concurrent.duration._
Expand Down Expand Up @@ -251,7 +250,7 @@ abstract class PoolSpec[P[_ <: AnyRef] <: Pool[_]](implicit ct: ClassTag[P[_]])
p.size() === 3
i === 3

Platform.collectGarbage
java.lang.System.gc();

p.acquire()

Expand Down

0 comments on commit aa775a1

Please sign in to comment.