OpenMutex in Windows

S

Sam.Gundry

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.
 
M

Mike Wahler

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
 
S

stork

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top