[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.

Thanks,
NickB

-----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;

into 

  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.

Ralf 

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




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



Other related posts: