This PR makes a few changes to allow passing a Go context through the abstraction layers.
I added one use of it in poll_oneoff where there are no file descriptors to wait on, the code now selects on a timer and the context instead of calling time.Sleep; This is rudimentary and can be enhanced in the future to better handle async context cancellation.
This PR makes a few changes to allow passing a Go context through the abstraction layers.
I added one use of it in
poll_oneoff
where there are no file descriptors to wait on, the code now selects on a timer and the context instead of callingtime.Sleep
; This is rudimentary and can be enhanced in the future to better handle async context cancellation.