On Fri, Mar 6, 2009 at 9:26 PM, Dan <danielk1...@gmail.com> wrote:

> Why do you want to use a single sqlite3_stmt* from multiple threads
> at the same time?

Really the only thing I need to access is sqlite3_sql to copy the statement
to another thread.

We have an asynchronous API that we expose to add-ons and core code in
Mozilla.  Right now, when a consumer calls executeAsync on a statement, we
make a new copy of the statement, transfer the bindings, and pass the new
one to the thread that executes the statement.  However, profiling shows
that creating a statement can often be an expensive operation.  I'm looking
at just giving the second thread the statement, and if the original thread
needs the statement again, I want to clone it off of the original.

Note: I'm leaving out some details here that probably aren't important.

Cheers,

Shawn
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to