?????? ?????? <
ed.zo...@gmail.com> wrote:
> ?an I get the data from the sqlite asynchronously ?
>
> Is there, for example, a syntax of this kind:
>
> $db eval "select * from tblname" -callback myreadproc
>
> proc myreadproc { args } {
> puts $args
> }
>
> Thanks.
Nothing built in to the Sqlite Tcl api.
But, if you use the Thread package, you can run your queries in a
second thread, and submit, and receive, queries and results
asynchronously.
See the -async flag of the ::thread::send command. You'd thread::send
queries to the background thread, and the background thread would
thread::send results back to your main thread.
The background thread would be synchronous as far as actually running
the queries, but asynchronous as far as the main thread is concerned.