To avoid races you should do this:
Main thread:
- sqlite3async_initialize()
- Starts child thread
- sqlite3_open_v2()
- sqlite3_exec(), sqlite3_prepare_v2()/sqlite3_step(), etc
- sqlite3_close()
- Halts and joins child thread
- sqlite3async_shutdown()
- exits
Child thread:
- sqlite3async
On Apr 4, 2011, at 7:10 PM, Pavel Ivanov wrote:
>> Can someone be so kind as to provide a short example of initializing
>> asynchronous module, opening DB for read/write, create a table, and write
>> some data to it?
>
> […] All you need to do is to initialize async module and call
> sqlite3as
> Can someone be so kind as to provide a short example of initializing
> asynchronous module, opening DB for read/write, create a table, and write
> some data to it?
There's nothing special in opening db, creating table or writing data
into it while using async module. You should use the same AP
Hi,
I am planning on incorporating the sqlite3async module into my project to
improve code responsiveness during disk writes. I've Googled all over for
example code on using the module but can't find any.
Can someone be so kind as to provide a short example of initializing
asynchronous module
4 matches
Mail list logo