Greetings!

My application will occasionally be called on to execute queries that
take several minutes.  This will be done from a worker thread so that
the user interface remains active.  As the query is being executed, the
user must be able to respond to alarms.  When the user hits F11 to go
straight to the alarm screen, the window from which the thread that is
running the long query disappears.  However, the thread continues.  I
need to stop the query.  

The thing that takes the time is the first call to sqlite3_step().  That
step is likely to take 5 minutes, and I may need to stop it after 1
minute.  The only way I can think of to do that is to call
sqlite3_interrupt() from a different thread.  However, for regular data
access operations, we can't use the same database connection in two
different threads.  Can sqlite3_interrupt() be called from a different
thread than the sqlite3_step() that I want to interrupt, or is there
some other mechanism I can use, or is there no way to do this?

Thanks very much!

Rob Richardson
Rad-Con, Inc.

Reply via email to