🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #742

Re: critical section on application server

#742
From: Evgeni
Date: Tue, 14 Nov 2000 00:00
49 lines
1630 bytes
I do it in same way.
It is working



Jeroen Eikmans <office@pulse-experts.nl> wrote in message
news:3a0a7357_2@dnews...
> hello all,
>
> I have an application server. Each time a client connects to it i want to
> increment a counter
> on my main form. Because the main form is in a different thread, i figured
i
> should use a instance of TCriticalSection. Am I doing this right ?:
>
> TCriticalSection* GMainGuard;
>
>
> void __fastcall TBMSApplicationServer::CRemoteDataModuleCreate(
>       TObject *Sender)
> {
>   // client connect
>   // enter the critical section of the global main form
>   GMainGuard->Enter();
>   try {
>     BMSServerForm->UpdateClients(1);
>   }
>   __finally {
>     // leave the critical section of the global main form
>     GMainGuard->Leave();
>   }
> }
>
>
> thanx,
>
> --
> Jeroen Eikmans - Software Engineering
>
> Pulse Automation Experts bv
> Marinus Dammeweg 66
> 5928PW VENLO
> The Netherlands
> office@pulse-experts.nl
> +31 (0)77 - 323 26 26
> +31 (0)77 - 323 26 27 fax
> Visit our site: www.pulse-experts.nl
>
>
Technical Details
Message-ID: <3a10e1ee_1@dnews>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3a0a7357_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,7d5c41d5707e4f2a
X-Google-Attributes: gidfcd2b,public
From: "Evgeni" <Evgeni@orgacom.ru>
Subject: Re: critical section on application server
Date: 2000/11/14
Message-ID: <3a10e1ee_1@dnews>
X-Deja-AN: 693376301
References: <3a0a7357_2@dnews>
X-Trace: 13 Nov 2000 22:55:42 -0800, 62.152.78.18
X-MSMail-Priority: Normal
X-Priority: 3
Newsgroups: borland.public.cppbuilder.database.multi-tier
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300