Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages
Started by Jeroen Eikmans
Thu, 09 Nov 2000 00:00
critical section on application server
Author: Jeroen Eikmans
Date: Thu, 09 Nov 2000 00:00
Date: Thu, 09 Nov 2000 00:00
39 lines
1454 bytes
1454 bytes
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
Re: critical section on application server
Author: Evgeni
Date: Tue, 14 Nov 2000 00:00
Date: Tue, 14 Nov 2000 00:00
49 lines
1630 bytes
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
>
>
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