Open sanjiv-saini opened 4 years ago
@sanju-singh Both LiteCollection
and LiteDatabase
are thread-safe in v4 and can be shared between multiple threads. Your problem seems to be a Mono-specific issue - I don't believe it is even possible to get a segmentation fault in managed code.
litedb v4 is not thread safe. i made a PR to fix this issue but it's not merged yet. @lbnascimento any chance to get this released?
Version LiteDB version: 4.1.4 OS: Android API 27
Describe the bug I am using Litedb v4 in Xamarin, I am creating liteDatabase connection and getting collections inside it once, and passing the collection to multiple threads which perform givenCollection.findALL().ToList() simultaneously. The app crashes sometimes(not always) resulting in SIGSEGV error, I am not getting what is causing this error.
Code to Reproduce
get the collection objection once and pass to the above method. calling above method multiple times causing the error.
Stacktrace