crossbeam
crossbeam copied to clipboard
Overflow evaluation with recursive types and Box
I have issues with "overflow evalution" with recursive enum
types, but only when I start a variant with a Sender
containing either a Receiver
or a Sender
, which also contains a Receiver
or a Sender
. You can see the playground here: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=5343c9bc10329a804d43ef1493527e38.
As you can see in this playground, when I start with a Receiver
, I do not have any compilation issue.
Also, if I swap Sender/Receiver with their payload, I do not have the issue, as you can see in this playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=7b946d0b6d04557ff648659edf0773ee.
How can this be possible and how can I solve this?
I had this issue as well. I was creating a context with some rtrb queues as well as a blocking one. I had to put that object into a box to workaround this problem. Reallllllyyyyyy strannnnnngeeeeeee.