Re: [sqlite] Request for an example code use async IO

2011-04-05 Thread Pavel Ivanov
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

Re: [sqlite] Request for an example code use async IO

2011-04-05 Thread Ricky Huang
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

Re: [sqlite] Request for an example code use async IO

2011-04-04 Thread Pavel Ivanov
> 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