🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11109

Re: synchronizing access to named mutexes

#11109
From: Dennis Jones
Date: Fri, 27 Feb 2004 16:24
25 lines
2006 bytes
"Bob Gonder" <notbg@notmindspring.invalid> wrote in message
news:dhnu305gp72fdko73lfr2ckr0ps4l7ltf5@4ax.com...
> Dennis Jones wrote:
>
> >Communications synchronization is managed with a pair of named mutexes.
> >After calling CreateProcess to start the EXE, the DLL sleeps for 1 second
> >before sending any commands to the EXE, which typically gives the EXE
enough
>
> >never respond to the command.  So my question is, how can the DLL know
when
> >the EXE has opened the memory-mapped file and named mutexes, and is ready
to
> >begin receiving requests?
>
> Aren't the signaling mechanisms you employ 2-way?
> The DLL could wait for a signal.  The EXE would set the signal after
> it has warmed up.

No, I don't think so...if the DLL waits on the mutex before the EXE has
opened a handle to it, the wait call will succeed immediately because the
DLL will already have ownership of the mutex (because it created it).

- Dennis
Technical Details
Message-ID: <403f6f4c$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!nx01.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <403ea9c9$1@newsgroups.borland.com> <dhnu305gp72fdko73lfr2ckr0ps4l7ltf5@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,147e3de49808f5a
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-02-27 08:40:59 PST
From: "Dennis Jones" <djones@nospam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <403ea9c9$1@newsgroups.borland.com> <dhnu305gp72fdko73lfr2ckr0ps4l7ltf5@4ax.com>
Subject: Re: synchronizing access to named mutexes
Date: Fri, 27 Feb 2004 08:24:45 -0800
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 204.200.27.7
Message-ID: <403f6f4c$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1077899084 204.200.27.7 (27 Feb 2004 08:24:44 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!nx01.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail