Skip to content

Commit c4dc2b7

Browse files
committed
Make Poll handle stoppable and startable
1 parent 386823a commit c4dc2b7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

client/curl.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ object Curl {
198198
}
199199
} else {
200200
println("stopping poll")
201-
pollHandle.stop()
201+
pollHandle.close()
202202
startTimerCB(multi, 1, null)
203203
}
204204
0

core/src/main/scala/scala/scalanative/loop/Poll.scala

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ import internals.HandleUtils
1818

1919
def stop(): Unit = {
2020
uv_poll_stop(ptr)
21+
}
22+
23+
def close(): Unit = {
24+
stop()
2125
HandleUtils.close(ptr)
2226
}
2327
}

0 commit comments

Comments
 (0)