RTC Forums

Subscription => Support => Topic started by: Ecole7 on May 15, 2017, 06:18:00 PM



Title: TRTLCriticalSection vs TRtcCritSec
Post by: Ecole7 on May 15, 2017, 06:18:00 PM
Hello,
I want to know what is the difference between the TRTLCriticalSection in standard library on Delphi, and TRtcCritSec in your library.
I use TRTLCriticalSection in my application server.
Should TRtcCritSec be used?
Thank you in advance for your answer.
Vincent


Title: Re: TRTLCriticalSection vs TRtcCritSec
Post by: D.Tkalcec (RTC) on May 15, 2017, 06:58:55 PM
Debugging. That's the only difference. Fiding a deadlock without having your own implementation of the critical section class can be challenging.

If you take a closer look at the "Acquire" method implemented on the "TRtcCritSec" class, which is used only if the RTC_WIN32_CS_DEBUG compiler define is declared (and should NOT be used in production), you will see what I mean.

Best Regards,
Danijel Tkalcec


Title: Re: TRTLCriticalSection vs TRtcCritSec
Post by: Ecole7 on May 16, 2017, 08:30:42 AM
Thank you for your quick response.
I have a problem with my application which happens very rarely (once every two months ...).
I guess it could come from my own log file system. I now use yours which is much better written.
I have another question for you also related to this problem.