Boost.Interprocess is a part of the C++ Boost library. It simplifies the use of common interprocess communication and synchronization mechanisms.
Questions tagged [boost-interprocess]
371 questions
0
votes
1 answer
boost::interprocess how to implement a simple thread safe job queue for worker processes
I'm attempting to create a basic system for taking jobs from a queue between processes with boost interprocess communications on Windows. When a worker process is free, it will take a job from the shared queue area.
The code is loosely copied from…

Tom
- 1,235
- 9
- 22
0
votes
1 answer
Making processes wait until resource is loaded into shared memory using Boost.Interprocess
Suppose I have n processes with IDs 1 to n. I have a file with lots of data, where each process will only store a disjoint subset of the data. I would like to load and process the file using exactly one process, store the resulting data in a data…

spektr
- 777
- 5
- 14
0
votes
0 answers
Why doesn't managed_shared_memory::find() return the same address as managed_shared_memory::construct()?
I'm having a problem where I am using Boost Interprocess to write some values to shared memory using managed_shared_memory::construct() then in another process trying to read those values using managed_shared_memory::find() but it is not coming back…

DesertBroncoFan
- 65
- 1
- 12
0
votes
1 answer
boost::interprocess::interprocess_condition::timed_wait() compiler error
I'm trying to create some objects in shared memory (which will be a future question) but for now I've getting a compiler error (boost 1.53.0 using g++ 4.8.5 on RHEL 7.8) that I can't figure out.
Event.h
#include…

DesertBroncoFan
- 65
- 1
- 12
0
votes
1 answer
boost::interprocess::shared_memory_object::remove fails
I made some test and I was able to create and remove boost::interprocess::shared_memory_object in a C++/CLI executable without problems. In a C++/CLI dll plugin I'm only able to create the boost::interprocess::shared_memory_object but the removal…

andriej
- 2,118
- 3
- 22
- 28
0
votes
1 answer
Query on boost interprocess::file_lock on NFS
We have an application which user can run to generate some data at user specified path. This unique output data is generated with respect to one unique input data-set - this input data is provided by the user.
When we initially developed the…

soumeng78
- 600
- 7
- 12
0
votes
0 answers
Find number of processes sharing memory when using boost interprocess
I have a producer process that will update a shared variable and updated value of shared variable will be read by many consumer processes.
Producer can only update shared variable if all the consumers have read it. To implement this, I need to know…

Snakeeye
- 31
- 3
0
votes
1 answer
How to construct vector with given count in boost interprocess and add elements to it
I've started to learn boost interprocess library and I encountered 2 problems so far. The first one is related to construction of vector with passing its size.
shm.construct("MyVector")(MAX_INPUT_SIZE, std::make_pair{"not_used", 0.0},…

bladzio
- 414
- 3
- 15
0
votes
1 answer
Not holding the lock while notifying a boost interprocessing condition variable causes issues
UPDATE 21.02.2020: Holding the lock while notifying doesn't actually help. As I understand so far, the condition variable is left invalid in the shared memory by the waiting process.
So I have this application using boost interprocess to share…

ianos
- 143
- 1
- 8
0
votes
1 answer
How can boost::interprocess::managed_mapped_file contain a elastic vector?
My understanding is that this code can keep a vector in a file.
using Alloc = boost::interprocess::allocator;
using Vec = boost::interprocess::vector;
void f() {
…

v..snow
- 189
- 7
0
votes
0 answers
Seg fault while accessing boost::unordered_map data from boost::interprocess shared memory
Stat.h
#include
#include
#include
#include
#include…

Mayank Jain
- 1
- 1
0
votes
0 answers
boost::interprocess, get_free_memory()
I use Boost::interprocess to create shared memory. But the reserved space is smaller than expected.
// Create new SHM
size_t memSize( vSimpleVtx.size()*sizeof(SimpleVtx)+
vTriIndices.size()*sizeof(int)+
…

Geom
- 827
- 4
- 15
0
votes
1 answer
Why can't I set some memory created from one process through another using Boost.Interprocess?
Here is the server :
Here is the client :
I create two independent C++ console apps, one called server and other called client. Server creates and shares a memory, the client mostly reads it, but sets some signalling server to exit. Although the…

Syed Alam Abbas
- 521
- 6
- 21
0
votes
1 answer
How to avoid scenario where Process2 keeps waiting for Process1 to release the named_mutex
I have several processes but only one should be running at the time. This means that let's say the Process1 is running and if the Process2 get launched, then Process2 should wait until Process1 is complete. I am considering the boost named_mutex for…

whoami
- 1,689
- 3
- 22
- 45
0
votes
1 answer
What does it mean to have "Process persistence" for boost interprocess_mutex?
From Boost Interprocess documentation, the (anonymous) process-shared mutex types have Process persistence, which it defines as follows:
Process-persistence: The mechanism lasts until all the processes that have opened the mechanism close it, exit…

Ad N
- 7,930
- 6
- 36
- 80