Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interprocess synchronization using mutex in windows(win32 or C++)

I want to build thread synchronization between 2 processes. basically one thread is running in a App1.exe and a second process is running in App2.exe. How do i synchronize these 2 threads in windows. can someone please share some examples or links.

like image 411
user1687824 Avatar asked May 11 '26 05:05

user1687824


1 Answers

Possibilities:

  • A WINAPI Mutex is an interprocess synchronization mechanism. See Using Mutex Objects for an overview.
  • boost::mutex. One reason to prefer this is the provided scoped_lock feature that ensures a lock is released regardless of how a scope is exited (exception or multiple return statements).
like image 114
hmjd Avatar answered May 13 '26 18:05

hmjd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!