[QUESTION] Object synchronization method was called from an unsynchronized block of code
See original GitHub issueI’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?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:39 (2 by maintainers)
Top Results From Across the Web
Object synchronization method was called from an ...
Object synchronization method was called from an unsynchronized block of code. Exception on Mutex.Release() · Ask Question. Asked 11 years, 6 ...
Read more >Object synchronization method was called from an ...
Question, Why is happening this error: Object synchronization method was called from an unsynchronized block of code. ? Pin. FANMixco7-Jan-15 8:38.
Read more >Synchronization by lock and Monitor statements in C# | Medium
The `lockerObject ` is a synchronizing object that can be locked by only one ... synchronization method was called from an unsynchronized block...
Read more >C# – Object synchronization method was called from an ...
I receive an exception in production with message "Object synchronization method was called from an unsynchronized block of code" on Mutex.
Read more >Object synchronization method was called from an ... - YouTube
C# : Object synchronization method was called from an unsynchronized block of code. Exception on Mutex.Release() To Access My Live Chat Page ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@a44281071 no this isn’t fixed in 5.0.12. Obviously multi-threading is complicated to get right. Unfortunately the readme file claims LiteDb is thread-safe, when it really isn’t fully (yet…).
same problem