[Xapian-discuss] Terminating a Xapian query

James Aylett james-xapian at tartarus.org
Fri Sep 25 11:17:52 BST 2009


On Fri, Sep 25, 2009 at 11:32:14AM +0200, Jean-Francois Dockes wrote:

> I think that there will always be worst case scenarios where the user will
> wish he had a Cancel button, and I have little idea how to offer one right
> now...

Generally speaking, your user interface should not be managed by the
same thread that any long-running process acts in. Without knowing
more about your application and platform I can't really say anything
further that's of help, but separating them out might allow you to
ignore this completely (having running searches the user can come back
to later), or manage things a little differently (if you don't use
remote backends, having a dedicated thread that runs searches, which
you can kill; but create the Database object in a separate thread).

J

-- 
  James Aylett

  talktorex.co.uk - xapian.org - uncertaintydivision.org



More information about the Xapian-discuss mailing list