[Xapian-discuss] Terminating a Xapian query
James Aylett
james-xapian at tartarus.org
Fri Sep 25 16:01:38 BST 2009
On Fri, Sep 25, 2009 at 01:40:07PM +0200, Jean-Francois Dockes wrote:
> Does it mean that all resources allocated by a thread executing get_mset()
> (for example) are referenced by the Database object at all (cancellable)
> times ? Is this something that is guaranteed by the Xapian API "contract" ?
>
> As far as I understand, thread cancellation safety is a very strong
> constraint, it can preclude things as simple as allocating a local c++
> string inside a function (under conditions). Was the Xapian search code
> specifically designed with this in mind ?
I honestly don't know a huge amount about thread cancellation (ie:
killing it from the outside of the thread). Xapian wasn't designed
with this in mind; it generally works by having objects refcounted
(automatically). If the thread doesn't clean up its stack-allocated
objects when killed, then it certainly won't work.
Olly or Richard can probably give more guidance on how Xapian works to
enable you to figure this out.
J
--
James Aylett
talktorex.co.uk - xapian.org - uncertaintydivision.org
More information about the Xapian-discuss
mailing list