sqlite3_exec()

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

sqlite3_exec()

Prajeesh Prakash
Dear Members,

I have one doubt, Is that sqlite3_exec function is working under the main application thread (Thread which calls the sqlite3_exec) or in a separate thread (If i am trying to INSERT the data in to DB without registering the Async writer).



Thank you

Prajeesh
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3_exec()

Simon Slavin-3
On 27 Nov 2018, at 2:43pm, Prajeesh Prakash <[hidden email]> wrote:

> I have one doubt, Is that sqlite3_exec function is working under the main application thread (Thread which calls the sqlite3_exec) or in a separate thread (If i am trying to INSERT the data in to DB without registering the Async writer).

If you do not register an async writer, SQLite does not start its own threads.  Each SQLite library call executes in the thread which calls it.

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3_exec()

Prajeesh Prakash
In that case if i am not registering the async writer then also my db will get updated (If i am writing to DB) am i correct?

>
>     On November 27, 2018 at 8:29 PM Simon Slavin <[hidden email]> wrote:
>
>     On 27 Nov 2018, at 2:43pm, Prajeesh Prakash <[hidden email]> wrote:
>
>         > >
> >         I have one doubt, Is that sqlite3_exec function is working under the main application thread (Thread which calls the sqlite3_exec) or in a separate thread (If i am trying to INSERT the data in to DB without registering the Async writer).
> >
> >     >
>     If you do not register an async writer, SQLite does not start its own threads. Each SQLite library call executes in the thread which calls it.
>
>     Simon.
>
>     _______________________________________________
>     sqlite-users mailing list
>     [hidden email]
>     http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3_exec()

Keith Medcalf
In reply to this post by Simon Slavin-3

On Tuesday, 27 November, 2018 07:59, Simon Slavin <[hidden email]> wrote:

>If you do not register an async writer, SQLite does not start its own
>threads.  Each SQLite library call executes in the thread which calls
>it.

Not entirely correct.  The sorter can be configured to automatically use threads.

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume.




_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3_exec()

Prajeesh Prakash
As per the asyncwriter code, that thread is not giving any BD update success or failure status so is there any way to get the status from the Asyncwriter thread because my application needs to know the status of the DB changes.

> On November 27, 2018 at 10:31 PM Keith Medcalf <[hidden email]> wrote:
>
>
>
> On Tuesday, 27 November, 2018 07:59, Simon Slavin <[hidden email]> wrote:
>
> >If you do not register an async writer, SQLite does not start its own
> >threads.  Each SQLite library call executes in the thread which calls
> >it.
>
> Not entirely correct.  The sorter can be configured to automatically use threads.
>
> ---
> The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume.
>
>
>
>
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users