Subject | Re: [firebird-support] How threadsafe is firebird and its client library |
---|---|
Author | Martijn Tonies |
Post date | 2009-03-06T14:45:58Z |
Hi Kim,
The Firebird client library is NOT thread safe, if you want to use
multiple threads, only one thread at a time can access a single connection.
So, you -can- use multiple threads if you use multiple connections.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com
The Firebird client library is NOT thread safe, if you want to use
multiple threads, only one thread at a time can access a single connection.
So, you -can- use multiple threads if you use multiple connections.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com
> I'm programming a heavily threaded application on top Firebird. Sometimes
> it crashes when two or more threads accesses the database.
>
> I now that it's not due to my program not being correctly syncronized.
>
> My question is:
>
> When i access FB (using IBPP) how should i synchonize this access? When i
> insert a lot of data using threads i discovered that synchronizing db
> access using a criticalsection (windows and c++) solves my crash problem.
>
> But if i have to protect all my db access using critical sections it
> essentially serializes my db access.
>
> Is it necessay to do this?
>
> How does other people solve this problem?
>
> I'm running superserver. will classic be any better?
>
> Is IBPP thread safe (i know i should ask this question in the IBPP forum)?
>
> I'm using FB 2.1.1 on windows 32 bit.
>
> many questions i know :-)
>
> thanx in advance
>
> kim gabrielsen
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>