Stream: git-wasmtime

Topic: wasmtime / PR #1961 wasi-common virtfs pipe: convert to b...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 01 2020 at 22:48):

pchickey opened PR #1961 from pch/sync_wasi_pipe to main:

Follow up to #1949

When we went to integrate this code, we discovered that we needed these virtual pipes to be Send and Sync. So, I have switched the internal types from Cell/RefCell/Rc to Arc/RwLock.

The RwLock.{read, write} results are always unwrap()ed because this code does not expose any way for a panic to occur while a lock is held.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jul 01 2020 at 22:48):

pchickey requested acfoltzer for a review on PR #1961.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 01 2020 at 22:52):

acfoltzer submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 02 2020 at 00:55):

pchickey updated PR #1961 from pch/sync_wasi_pipe to main:

Follow up to #1949

When we went to integrate this code, we discovered that we needed these virtual pipes to be Send and Sync. So, I have switched the internal types from Cell/RefCell/Rc to Arc/RwLock.

The RwLock.{read, write} results are always unwrap()ed because this code does not expose any way for a panic to occur while a lock is held.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jul 02 2020 at 01:09):

pchickey edited PR #1961 from pch/sync_wasi_pipe to main:

Follow up to #1949

When we went to integrate this code, we discovered that we needed these virtual pipes to be Send and Sync. So, I have switched the internal types from Cell/RefCell/Rc to Arc/RwLock.

The RwLock.{read, write} results are always unwrap()ed because this code does not expose any way for a panic to occur while a lock is held.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jul 02 2020 at 01:10):

pchickey edited PR #1961 from pch/sync_wasi_pipe to main:

Follow up to #1949

When we went to integrate this code, we discovered that we needed these virtual pipes to be Send and Sync. So, I have switched the internal types from Cell/RefCell/Rc to Arc/RwLock.

The RwLock.{read, write} results are always unwrap()ed because this code does not expose any way for a panic to occur while a lock is held.

We also identified that the Handle::try_clone method was incorrect, and did a manual impl of Clone with the correct semantics.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jul 02 2020 at 01:11):

acfoltzer submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 02 2020 at 05:54):

pchickey merged PR #1961.


Last updated: Dec 23 2024 at 12:05 UTC