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 "
2
2
style = defaultWithAlign
3
3
docstrings = JavaDoc
4
4
assumeStandardLibraryStripMargin = true
Original file line number Diff line number Diff line change @@ -4,9 +4,7 @@ licenses := Seq(
4
4
)
5
5
publishMavenStyle := true
6
6
Test / publishArtifact := false
7
- pomIncludeRepository := { _ =>
8
- false
9
- }
7
+ pomIncludeRepository := { _ => false }
10
8
ThisBuild / publishTo := {
11
9
val nexus = " https://oss.sonatype.org/"
12
10
if (isSnapshot.value)
Original file line number Diff line number Diff line change @@ -9,20 +9,21 @@ object EventLoop {
9
9
// Schedule loop execution after main ends
10
10
scalanative.runtime.ExecutionContext .global.execute(
11
11
new Runnable {
12
+
12
13
/**
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
+ */
26
27
def run (): Unit = {
27
28
scala.scalanative.runtime.loop()
28
29
while (uv_loop_alive(loop) != 0 ) {
Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ object Main {
14
14
println(" boop" )
15
15
Timer .delay(1 .second)
16
16
}
17
- .onComplete { _ =>
18
- println(" done" )
19
- }
17
+ .onComplete { _ => println(" done" ) }
20
18
}
21
19
}
Original file line number Diff line number Diff line change 1
1
addSbtPlugin(" org.scala-native" % " sbt-scala-native" % " 0.4.0-M2" )
2
2
addSbtPlugin(" com.jsuereth" % " sbt-pgp" % " 2.0.0" )
3
3
addSbtPlugin(" 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 {
89
89
90
90
state._1 = id
91
91
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) }
95
93
! (client.asInstanceOf [Ptr [Ptr [Byte ]]]) = state.asInstanceOf [Ptr [Byte ]]
96
94
97
95
uv_tcp_init(EventLoop .loop, client)
You can’t perform that action at this time.
0 commit comments