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

  • From: "Nick Bradbury" <nick.bradbury@xxxxxxxxx>
  • To: <yunqa@xxxxxxxxxxxxx>
  • Date: Tue, 1 Sep 2009 14:54:36 -0500

Hi Ralf,

Just wondering if you have a timeline in mind for coding this change?  I
have a new release going out this week, and I'd be more comfortable having
your code changes instead of relying on my own.


-----Original Message-----
From: yunqa-bounce@xxxxxxxxxxxxx [mailto:yunqa-bounce@xxxxxxxxxxxxx] On
Behalf Of Delphi Inspiration
Sent: Sunday, August 30, 2009 2:02 AM
To: yunqa@xxxxxxxxxxxxx
Subject: [yunqa.de] Re: TDISQLite3Database.UnRegisterStatement thread-safe?

Thanks for the catch. Yes, changing

  FStatements: TList;


  FStatements: TThreadList;

in DISQLite3Database.pas is a quick fix which will improve your situation,
but it still leaves FStatements.Count non-threadsave.

It is safer IMO to wrap all access to FStatements using a dedicated mutex
within TDISQLite3Database.

I will send the code after I have completed a few more tests.


Delphi Inspiration mailing list

Delphi Inspiration mailing list

Other related posts: