On 24 Jul 2012, at 6:58am, Durga D <durga.d...@gmail.com> wrote: > My Req. is: I have to write a wrapper for sqlite3. This wrapper will be > called by different clients from different threads within the process. > Requests might be read or write. Wrapper will have static sqlite3*. So all > clients shares the same sqlite3*. To simulate this, I created this sample > application. > > doubt: How can I achieve this single thread when multiple clients are > called.
Because you are starting off with different threads it doesn't matter in this case. You have already organised your client into threads so just continue to use the threads that you already have. We sometimes get questions from people who have made individual threads in their program only because they think it will speed up SQLite processing. This is a waste for SQLite because it locks the whole database anyway. But your application uses individual threads for a different reason, and SQLite will also handle that okay providing that you haven't messed with anything mentioned here: <http://www.sqlite.org/faq.html#q6> It won't be much faster or slower than doing all your access using a single thread. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users