🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages Started by CC Thu, 17 Apr 2003 18:16
CreateMutex/ReleaseMutex/CloseHandle Question
#16967
Author: CC
Date: Thu, 17 Apr 2003 18:16
10 lines
1236 bytes
Greetings,
I was wondering is the proper way to close(release a mutex) is by calling
ReleaseMutex() immediately followed by CloseHandle(), supplying the mutex
handle argument?

It appears that ReleaseMutex() may not actaully free up resources associated
with the handle?

Thanks,
CurtC
Re: CreateMutex/ReleaseMutex/CloseHandle Question
#16968
Author: Remy Lebeau (TeamB)
Date: Thu, 17 Apr 2003 19:02
14 lines
1442 bytes
"CC" <Xcurtc@tmscorp.com> wrote in message
news:3e9eef46$1@newsgroups.borland.com...

> It appears that ReleaseMutex() may not actaully free
> up resources associated with the handle?

It's not supposed to.  ReleaseMutex() only releases the lock on the mutex
(if the calling thread has the lock to begin with, that is), so that another
thread waiting for the mutex lock can then obtain it.  It is CloseHandle()
only that actualy frees the mutex resources when you're done using them.


Gambit
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads