Skip to content

Commit 4dc1ed7

Browse files
committed
Simplify test-project-simple
1 parent a96e029 commit 4dc1ed7

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

test-project-simple/build.sbt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name := "test-project-simple"
22
version := "0.2.0"
33
libraryDependencies ++= Seq("com.typesafe" % "config" % "1.2.1")
44

5-
mainClass in Compile := Some("ExampleApp")
6-
75
enablePlugins(JavaServerAppPackaging, UpstartPlugin, GraalVMNativeImagePlugin)
86

97
maintainer := "Josh Suereth <joshua.suereth@typesafe.com>"
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
1-
import java.util.concurrent._
1+
package hello.world
22

33
object ExampleApp extends App {
44

5-
val executorService = Executors newFixedThreadPool 2
6-
75
val memory = Runtime.getRuntime.maxMemory() / (1024L * 1024L)
86
println(s"Memory $memory m")
97
println(s"Args: ${args mkString " | "}")
108

119
while (true) {
12-
for (i <- 0 to 2) executorService execute HelloWorld(i)
10+
println(s"[${System.currentTimeMillis()}] Hello, world!")
1311
Thread sleep 5000
1412
}
1513

16-
}
17-
18-
case class HelloWorld(i: Int) extends Runnable {
19-
def run(): Unit = {
20-
println(s"[$i] Hello, world!")
21-
}
2214
}

0 commit comments

Comments
 (0)