Skip to content

Commit

Permalink
Make Poll handle stoppable and startable
Browse files Browse the repository at this point in the history
  • Loading branch information
lolgab committed Jul 25, 2020
1 parent 386823a commit c4dc2b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/curl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ object Curl {
}
} else {
println("stopping poll")
pollHandle.stop()
pollHandle.close()
startTimerCB(multi, 1, null)
}
0
Expand Down
4 changes: 4 additions & 0 deletions core/src/main/scala/scala/scalanative/loop/Poll.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import internals.HandleUtils

def stop(): Unit = {
uv_poll_stop(ptr)
}

def close(): Unit = {
stop()
HandleUtils.close(ptr)
}
}
Expand Down

0 comments on commit c4dc2b7

Please sign in to comment.