xtra icon indicating copy to clipboard operation
xtra copied to clipboard

Introduce top-level `recv_future` module

Open thomaseizinger opened this issue 3 years ago • 3 comments

This creates consistency with the send_future module. To achieve this, we temporarily make the fields of Receiver public. This will go away once we merge #158 because it allows us to directly embed the ChanPtr and BroadcastQueue type in the ReceiveFuture instead of the actual Receiver.

In addition to symmetry, this PR enables a nice simplification where we can hardcode the RC type RxStrong.

thomaseizinger avatar Jul 29 '22 12:07 thomaseizinger

This PR actually made me wonder, why do we have the RxWeak type? We don't ever seem to use it :)

thomaseizinger avatar Jul 29 '22 12:07 thomaseizinger

This PR actually made me wonder, why do we have the RxWeak type? We don't ever seem to use it :)

I had a crack at removing this in https://github.com/Restioson/xtra/pull/160.

thomaseizinger avatar Jul 29 '22 12:07 thomaseizinger

Setting this to draft until #160 is either merged or closed.

thomaseizinger avatar Jul 29 '22 12:07 thomaseizinger

Going to continue here once #158 is merged.

thomaseizinger avatar Aug 17 '22 16:08 thomaseizinger

I've merged https://github.com/Restioson/xtra/pull/158 into here under the assumption that it is not going to change much anymore until it is merged, meaning this should only be reviewed once https://github.com/Restioson/xtra/pull/158 is merged and this has been updated with master again.

Merging https://github.com/Restioson/xtra/pull/158 in now just allowed me to fix the merge conflicts upfront :)

thomaseizinger avatar Aug 31 '22 18:08 thomaseizinger

The commit log is a bit of a mess because of the squash merging that I did but the final diff is correct :D

thomaseizinger avatar Sep 01 '22 13:09 thomaseizinger

This is a pure refactor, right?

Restioson avatar Sep 07 '22 15:09 Restioson

This is a pure refactor, right?

Yes this is a pure refactor. The primary change is that we have only one ReceiveFuture now which is part of the public API. Once we land https://github.com/Restioson/xtra/pull/133, Mailbox will be a public type and thus I thought it is better if we treat ReceiveFuture the same way we treat SendFuture.

thomaseizinger avatar Sep 08 '22 00:09 thomaseizinger

Cool :) In that case, feel free to merge when ready

Restioson avatar Sep 08 '22 07:09 Restioson