Quantcast
Channel: MarsHut
Viewing all articles
Browse latest Browse all 6551

Xapian::Document and threads

$
0
0
Hi,

While investigating very infrequent crashes in the Recoll indexer, I have
come to a very basic question: is it safe to pass a copy of a
Xapian::Document from thread to thread (multiple threads queue documents,
other thread updates the index) ?

I don't seem to get directly into trouble while doing this, but I don't see
anything either in the RefCntr implementation which would explicitely make
it thread-safe, so I am wondering. Maybe I'm just missing the obvious.

Of course, I could create the docs on the heap instead, and pass pointers,
but is this needed ?

Cheers,

jf

Viewing all articles
Browse latest Browse all 6551

Latest Images

Trending Articles



Latest Images