Get Sharing violation exception
See original GitHub issueHi James, I used MonkeyChache.FileStore 1.2.0-beta in my .NetStandard 2.0 Xamarin.forms project.
I got this exception when I try to call
Barrel.Current.Exists(key);
System.IO.IOException: Sharing violation on path /data/user/0/com.xx.app/MonkeyCacheFS/idx.dat
Do you have any idea why it throw this exceptions? I can catch the exception and it works fine. Do you think it’s necessary to mention this in the document?
Thanks, Jesse
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Sharing violation IOException while reading and writing to ...
This is caused when you try to Read or Write a file you just created from a separate stream. Solving this is very...
Read more >IOException: Sharing violation on path C
Im getting this error while I try loading my game. It worked before perfectly and then just giving me this error.
Read more >How to Fix the Excel Sharing Violation Error - Layer Blog
A sharing violation refers to any attempt made by an application to access content that is being used by another. In Excel, this...
Read more >Excel intermittently giving sharing violation error when ...
1. Open File Explorer with the Windows key + E · 2. Right-click the folder that includes the Excel file the sharing violation...
Read more >IOException: Sharing violation - Forums | Moodkie Interactive
This occurs when the save file is being accessed by another program or process. For example, the user has the file open in...
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
Hi,
I’m having the same issue on MonkeyCache.FileStore. I just moved from MonkeyCache.LiteDB to MonkeyCache.FileStore since I had performance issues if the cache was getting too big.
In MonkeyCache.LiteDB I never encountered any concurrent access problems from different threads but now I’m also getting the Sharing violation (without changing anything else in my code).
@jamesmontemagno Could you please modify MonkeyCache.FileStore to ensure that only one process accessing the underlying file at the same time.
Since my code is highly multi threaded I need to use a wrapper around MonkeyCache.FileStore accesses at the moment to ensure single access.
`public sealed class CustomBarrel : IBarrel { private CustomBarrel() { }
But I think such mechanism should be in MonkeyCache.FileStore itself.
Thx a lot.
Markus
also happening to me