Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdded sender.send_borrowed(data), to reduce copying #161
Conversation
|
Someone else who has been more involved in the discussions about #156 should probably review this. |
|
I still don't think serde-roundtrip is a good idea, so not me.
|
|
@nox: Just to confirm... Stuff we agree about: having a @antrik r? |
|
@jdm very wise. |
|
FYI, this would let us reuse the allocation of BuiltDisplayLists (~1MB/frame) in webrender. |
|
r? @gankro then? (This PR has been languishing while I've been busy implementing worklets.) |
|
@asajeffrey sorry for slacking on this :-( I did glance at briefly it when you published it, and had a bunch of questions, but didn't manage to write them down at the time... Please give it another couple of days while I look into it. If I still fail to follow up, feel free to ignore me... |
|
@gankro doesn't Webrender use |
|
Since my concerns pertain to the general approach, rather than the specific pull request, I deemed it more appropriate to follow up on the discussion at #156 for now. |
|
|
|
Sorry I didn't follow up on this. I think I convinced myself that webrender doesn't need this, for the reasons stated by antrik. |
|
Closing in favour of experimenting with something like https://github.com/asajeffrey/shared-data |
asajeffrey commentedMar 29, 2017
For compatibility with channels, senders take ownership of their data, and drop it immediately after sending. This PR adds the ability to send borrowed data, including nested data, for example sending a
&(&str,u32)on a sender expecting a(String,u32).cc @nox @antrik.
Fixes #156.