ipc-channel icon indicating copy to clipboard operation
ipc-channel copied to clipboard

Question: is IpcSharedMemory currently read-only?

Open gterzian opened this issue 6 years ago • 5 comments

I couldn't find a way to mutate the contents of shared memory using the existing API. For example DerefMut is not implemented.

Is this intended, or am I missing something on how to actually do the mutation?

I would like to send some shared memory across process, then mutate it and have the other process see the mutation.

I've tried to do this with unsafe code, and I'm actually not sure if that is working or not(I can see the mutation in the process doing it, however I'm still testing if the other process sees it as well).

See https://github.com/servo/servo/pull/23909/files#diff-2967b47a1530b8945948650780afabcaR89

gterzian avatar Aug 07 '19 04:08 gterzian

Reading https://github.com/servo/ipc-channel/issues/126 I think not, but I think it should be possible to send same IpcSharedMemory back after inner data was changed.

sagudev avatar Aug 20 '24 09:08 sagudev