[yunqa.de] Re: TDISQLite3Database.UnRegisterStatement thread-safe?

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx,<yunqa@xxxxxxxxxxxxx>
  • Date: Wed, 02 Sep 2009 19:10:18 +0200

At 18:01 02.09.2009, Nick Bradbury wrote:

>For performance reasons, I had decided I should change your code so that a
>critical section is used instead of a mutex (since there can be only one
>instance of my application).  But looking at the SQLite C source, it appears
>that at least on Windows, a sqlite3_mutex is actually a critical section
>already, in which case no changes are necessary.
>
>Can you confirm that this is the case?

Yes, both Delphi's TThreadList and TCriticalSection as well as SQLite's Win32 
mutex implementation use the same Windows API calls:

  * InitializeCriticalSection, DeleteCriticalSection
  * EnterCriticalSection, LeaveCriticalSection

Ralf 

_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: