Do I need to lock a table during a FLUSH when using VSDK C++
API in multi-threaded app?
Ivan Smahin
ivan_smahin at valentina-db.com
Wed Aug 16 10:03:46 CDT 2006
Hello Matthew,
Wednesday, August 16, 2006, 12:42:43 AM, you wrote:
> Hello,
> I am using the VSDK 2 C++ in a multi-threaded application on a
> Macintosh.
> I normally use the API way to work with the database tables, so I
> make sure
> that I use semaphores/locks on each individual table whenever I
> either read, modify, or add records.
> My question is this:
> If I do a flush() on a database, do I need to lock the tables
> contained in that database
> to prevent other threads from potentially attempting to read, modify,
> or add records at the same time?
> Or is the flush() operation implemented so that it does not interfere
> with other threads
> potentially accessing the tables contained in the database being
> flushed?
> What are the rules about locking tables for exclusive access now that
> Valentina 2 now
> is more thread-friendly?
Currently you need lock/unlock every "kernel" object to make sure be
threading safe. So, for now, global mutex seems to be most safe
solution.
--
Best regards,
Ivan mailto:ivan_smahin ÎÁ valentina-db.com
More information about the Valentina
mailing list