WebAssembly / wasi-io

I/O Types proposal for WASI
Other
144 stars 20 forks source link

Document how `poll_list` handles errors #48

Open sunfishcode opened 1 year ago

sunfishcode commented 1 year ago

The poll_list function itself doesn't have a return value so it's infallible. We should document how it behaves when passed invalid file descriptors.

pchickey commented 1 year ago

File descriptors being passed to poll_list are a thing of the past. It should be impossible to create an error because all Pollable resources are always valid to poll on, right?

sunfishcode commented 1 year ago

Yes, that's right. So we should document what happens if you're using bindings like C and you're using a handle after it's been dropped.

pchickey commented 1 year ago

Easy enough - it will trap, just like every other case of passing an invalid resource. Agreed we can put it in the docs.