4 ms·
IPC having a lot of "overhead" is nonsense (other than, like, managing a mutex or semaphore). I've used many header-only IPC libraries (this one[1] worked great
by dvt 2y ago
IPC having a lot of "overhead" is nonsense (other than, like, managing a mutex or semaphore). I've used many header-only IPC libraries (this one[1] worked great on Windows/MacOS). It's way easier to get a hang of instead of jerry-rigging TCP or UDP to do IPC (yuck).
[1] https://github.com/jarikomppa/ipc https://github.com/jarikomppa/ipc
- DawsonBruce 2y agoThanks for sharing this. I recently built something similar for a closed source project and am curious how I didn’t run across this library in my research. Briefly: my implementation uses a templated RAII-style wrapper that persists objects in shared memory for as long as an instance of that object remains in scope. Once the last object goes out of scope, shared memory is freed. It works great so far. I’ll probably reference this library to compare implementations and see what I can learn. Thanks again.
- dvt 2y agoIf you need something more powerful, Boost.Interprocess is also a thing[1]. I used it like 10 years ago and seemed to work well. Looking at the docs, it even has a RAII-ish thing called `boost::interprocess::remove_shared_memory_on_destroy`. [1] https://www.boost.org/doc/libs/1_85_0/doc/html/interprocess.html https://www.boost.org/doc/libs/1_85_0/doc/html/interprocess....