-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow reusing same shared IpcSharedMem for transfers #356
Conversation
48764c0
to
d20de40
Compare
|
3ace188
to
656ba2b
Compare
Benches from CI: https://github.com/servo/ipc-channel/actions/runs/10472511882 |
Signed-off-by: sagudev <[email protected]>
Signed-off-by: sagudev <[email protected]>
656ba2b
to
0b3bb83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable as a fully-unsafe API. It would be nice if we could detect invalid usage at runtime similar to Arc::get_mut, but I don't have ideas for how to do that soundly.
The main problem is we would need to do cross-process locking which is costly, but we might want to implement this in the future to also fulfill other usecases. |
Simple "solution" to #126, it's not exactly zero-copy, but it allows to modify inner buffer of IpcSharedMem and then send it back. This is all
unsafe
but we can uphold all safety variants forGPUBuffer
(request-response msgs).Example
before:
after: