By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,124 Members | 950 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,124 IT Pros & Developers. It's quick & easy.

OpenMutex in Windows

P: n/a
Hi,

I am synchronising two processes via a mutex. Is it (very) inefficient
for the secondary process to open and then close the named mutex each
time it requires access to the shared resource?

Can someone direct me to information regarding efficiency of mutex,
semaphores and events?

Thanks for any response,

Sam.

Dec 27 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
<Sa********@gmail.comwrote in message
news:11*********************@a3g2000cwd.googlegrou ps.com...
Hi,

I am synchronising two processes via a mutex. Is it (very) inefficient
for the secondary process to open and then close the named mutex each
time it requires access to the shared resource?

Can someone direct me to information regarding efficiency of mutex,
semaphores and events?
This isn't really the place for such an issue. Here,
we only discuss the C++ language itself, not platform-
specific issues like yours.

You should get good help at newsgroup
comp.os.ms-windows.programmer.win32

Also consider visiting the developer forums
at www.msdn.microsoft.com

Good luck.

Purpose and guidelines of comp.lang.c++ :
http://www.slack.net/~shiva/welcome.txt

-Mike
Dec 28 '06 #2

P: n/a
Stork replied to:
I am synchronising two processes via a mutex. Is it (very) inefficient
for the secondary process to open and then close the named mutex each
time it requires access to the shared resource?

Can someone direct me to information regarding efficiency of mutex,
semaphores and events?

Thanks for any response,

Sam.
For the case of Windows, probably the slickest way of doing IPC is to
Post a private Windows message from one process to another.

This lets you leverage the queuing function of Windows, and from there
you can build a state machine on both sides of the system.

You already have a message queue in all Windows applications, why not
use it?

Dec 28 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.