[odb-users] ODB Crashed in a multi-threaded environment

Albert (Jinku) Gu albert.gu at ringcentral.com
Tue Feb 2 09:40:46 EST 2016


Hi Boris,

Thank you very much for your reply!

>From the mail list, we can only get some main ideas.  

Is our ODB support one thread dedicated to writing/reading, and the second one only for reading at the same time?

Or, is there any detailed steps/guidelines to say how we can support concurrency with ODB?

Eg.  How to compile the sqlite for iOS and support multi-threads.

If there is an example, especially an iOS or Android example, that would be much better.

Thank you in advance!

Regards,
Albert

> On Feb 2, 2016, at 9:27 PM, Boris Kolpackov <boris at codesynthesis.com> wrote:
> 
> Hi Albert,
> 
> Albert (Jinku) Gu <albert.gu at ringcentral.com> writes:
> 
>> And the exception message is “transaction already in progress in this
>> thread”.
> 
> This means you have tried to create a nested ODB transaction, something
> along these lines:
> 
> void f ()
> {
>  transaction t (db.begin ()); // Exception.
>  ...
> }
> 
> void g ()
> {
>  transaction t (db.begin ());
>  f ();
> }
> 
> Boris




More information about the odb-users mailing list