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

  • From: "Nick Bradbury" <nick.bradbury@xxxxxxxxx>
  • To: <yunqa@xxxxxxxxxxxxx>
  • Date: Wed, 2 Sep 2009 09:16:31 -0500

Thanks for the quick update, Ralf!  I've just added your changes to my app,
but for safety I wrapped the calls to
sqlite3_mutex_enter/sqlite3_mutex_leave in Try..Finally blocks.

I'll let you know if I run into any problems.

Best,
Nick

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

The modified code is in the attach. It is tested by a number of threads
which continuously create and destroy TDISQLite3Statements on a single
TDISQLite3Database instance for some time. Without the fix, the test caused
access violations at random times and places. With the fix, it passes
without problems.

I believe that the changes should work fine for you as well. Please keep us
posted on any issues.

Ralf 

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



Other related posts: