Skip to content

[QUESTION] Object synchronization method was called from an unsynchronized block of code #1546

@jokker23

Description

@jokker23

I'm getting this error intermittently while running with ConnectionType.Shared and don't with the default.

System.ApplicationException: Object synchronization method was called from an unsynchronized block of code.

   at System.Threading.Mutex.ReleaseMutex()
   at LiteDB.SharedEngine.CloseDatabase()
   at LiteDB.SharedEngine.Upsert(String collection, IEnumerable`1 docs, BsonAutoId autoId)
System.ApplicationException: Object synchronization method was called from an unsynchronized block of code.
   at System.Threading.Mutex.ReleaseMutex()
   at LiteDB.SharedEngine.CloseDatabase()
   at LiteDB.SharedDataReader.Dispose()
   at LiteDB.LiteQueryable`1.ToDocuments()+MoveNext()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToList()

I tried researching this but haven't come up with any ideas.
Does anyone have any suggestions on why I'm getting this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions