Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-introduces internal fsapi.File with non-blocking methods #1613

Merged
merged 1 commit into from
Aug 7, 2023

Commits on Aug 7, 2023

  1. Re-introduces internal fsapi.File with non-blocking methods

    Folks aren't currently on the same page on whether or not users should
    be able to implement the timeout parameter on `File.Poll` or whether it
    should always be externally controlled via a sleep loop which uses poll
    (immediate). Until we are sure internally, we shouldn't expose this for
    implementation, as it would be confusing for the same reason.
    
    This migrates the non-blocking functionality back into the internal
    package.
    
    One future way out could be to allow the user to decide if the backend
    is allowed to use the timeout parameter or not. Just as they control the
    FS, they could control a poller, which would then be able to span across
    both normal files and sockets. One could then be able to choose in the
    case of a single file and a specific known wasm, simply use the native
    timeout. In other words, since there are valid alternate answers, even
    though Go doesn't support custom pollers we could, if we decide that
    native polling is basically not allowed. Alternatively, we could force
    it to never be allowed by removing the timeout parameter (making it a
    poll immediate). Anyway, I will leave that decision up to @ncruces and
    @evacchi who will take responsibility of whichever decision is made.
    
    Signed-off-by: Adrian Cole <adrian@tetrate.io>
    Adrian Cole committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    e7cf1de View commit details
    Browse the repository at this point in the history