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
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