Question

There's a well-known algorithm that employs readers/writer lock synchronization between threads of a single process on a Windows platform using pure WinAPIs/C++:

Here's an example

In my case I need to do this between several processes, i.e. the writer is in one process, and readers are in other processes. Any idea how to do that?

PS. I need this for an already developed project, so I can't use anything other than C++/MFC or pure WinAPIs. In other words I can't use Boost or the like extensions.

Was it helpful?

Solution

You can use the same algorithm but instead of CriticalSection you can use Mutexes from the WinAPI.
If you use the same name for your Mutex objects you can use them in several processes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top