dispatchrun / wasi-go

A Go implementation of the WebAssembly System Interface (WASI)
Apache License 2.0
124 stars 7 forks source link

propagate context through WASI provider #5

Closed achille-roussel closed 1 year ago

achille-roussel commented 1 year ago

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.