Stream: git-wasmtime

Topic: wasmtime / PR #7427 Rename poll-list to poll, poll-one to...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 18:00):

pchickey opened PR #7427 from bytecodealliance:pch/pollable_methods to bytecodealliance:main:

Downstreaming changes to wasi:io/poll proposed here:
https://github.com/WebAssembly/wasi-io/pull/54

poll-list becomes poll and poll-one becomes a method directly on pollable - these are NFCs, just renamings for ergonomics, and because poll-one was easily confused with poll-oneoff.

pollable.ready is new functionality that allows you to check the readiness of a pollable without blocking. I took the most trivial path to implement it via futures::poll_immediate. I had to add a minor optimization to the clock deadline future so that we can test it by asserting subscribe_duration(0).ready() and subscribe_instant(now() - 1).ready() are true.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 18:00):

pchickey requested alexcrichton for a review on PR #7427.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 18:00):

pchickey requested wasmtime-core-reviewers for a review on PR #7427.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 18:56):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 18:56):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 18:56):

alexcrichton created PR review comment:

Could this perhaps be matches!(..., Some(())) to emphasize this isn't accidentally throwing away a "real" result from the poll?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 18:56):

alexcrichton created PR review comment:

Ideally this method wouldn't be on this list since it shouldn't block, but I can also see how that complicates the implementation, so I'm fine either way

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 20:13):

pchickey updated PR #7427.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 20:13):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 20:13):

pchickey created PR review comment:

Good idea!

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 20:14):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 20:14):

pchickey created PR review comment:

Agreed. The implementation, as it stands, shouldn't ever actually be Pending, and I think we will be able to keep an eye on that invariant going forwards.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 20:14):

pchickey has enabled auto merge for PR #7427.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 21:30):

pchickey merged PR #7427.


Last updated: Nov 22 2024 at 16:03 UTC