File tree Expand file tree Collapse file tree 6 files changed +19
-24
lines changed Expand file tree Collapse file tree 6 files changed +19
-24
lines changed Original file line number Diff line number Diff line change 1- version = "2.0.1 "
1+ version = "2.4.2 "
22style = defaultWithAlign
33docstrings = JavaDoc
44assumeStandardLibraryStripMargin = true
Original file line number Diff line number Diff line change @@ -4,9 +4,7 @@ licenses := Seq(
44)
55publishMavenStyle := true
66Test / publishArtifact := false
7- pomIncludeRepository := { _ =>
8- false
9- }
7+ pomIncludeRepository := { _ => false }
108ThisBuild / publishTo := {
119 val nexus = " https://oss.sonatype.org/"
1210 if (isSnapshot.value)
Original file line number Diff line number Diff line change @@ -9,20 +9,21 @@ object EventLoop {
99 // Schedule loop execution after main ends
1010 scalanative.runtime.ExecutionContext .global.execute(
1111 new Runnable {
12+
1213 /**
13- * This is the implementation of the event loop
14- * that integrates with libuv. The logic is the
15- * following:
16- * - First we run all Scala futures in the default
17- * execution context
18- * - Then in loop:
19- * - we check if they generated IO calls on
20- * the event loop
21- * - If it's the case we run libuv's event loop
22- * using UV_RUN_ONCE that blocks only once
23- * - We run the default execution context again
24- * in case the callbacks generated new Futures
25- */
14+ * This is the implementation of the event loop
15+ * that integrates with libuv. The logic is the
16+ * following:
17+ * - First we run all Scala futures in the default
18+ * execution context
19+ * - Then in loop:
20+ * - we check if they generated IO calls on
21+ * the event loop
22+ * - If it's the case we run libuv's event loop
23+ * using UV_RUN_ONCE that blocks only once
24+ * - We run the default execution context again
25+ * in case the callbacks generated new Futures
26+ */
2627 def run (): Unit = {
2728 scala.scalanative.runtime.loop()
2829 while (uv_loop_alive(loop) != 0 ) {
Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ object Main {
1414 println(" boop" )
1515 Timer .delay(1 .second)
1616 }
17- .onComplete { _ =>
18- println(" done" )
19- }
17+ .onComplete { _ => println(" done" ) }
2018 }
2119}
Original file line number Diff line number Diff line change 11addSbtPlugin(" org.scala-native" % " sbt-scala-native" % " 0.4.0-M2" )
22addSbtPlugin(" com.jsuereth" % " sbt-pgp" % " 2.0.0" )
33addSbtPlugin(" org.xerial.sbt" % " sbt-sonatype" % " 3.8.1" )
4- addSbtPlugin(" org.scalameta" % " sbt-scalafmt" % " 2.3.0 " )
4+ addSbtPlugin(" org.scalameta" % " sbt-scalafmt" % " 2.3.4 " )
Original file line number Diff line number Diff line change @@ -89,9 +89,7 @@ object Server {
8989
9090 state._1 = id
9191 state._2 = client
92- state._3 = Parser .initConnection(id) { r =>
93- handler(r, client)
94- }
92+ state._3 = Parser .initConnection(id) { r => handler(r, client) }
9593 ! (client.asInstanceOf [Ptr [Ptr [Byte ]]]) = state.asInstanceOf [Ptr [Byte ]]
9694
9795 uv_tcp_init(EventLoop .loop, client)
You can’t perform that action at this time.
0 commit comments