SharedMemory icon indicating copy to clipboard operation
SharedMemory copied to clipboard

Cannot create a file when it already exists when use MemoryMappedFile.CreateNew

Open happysammy opened this issue 5 years ago • 0 comments

I start two processes, one writes data continuously, and another reads data, when i kill the write process and restart, it throws an exception "Cannot create a file when it already exists" , so i look into the library source code, change the "MemoryMappedFile.CreateNew" function in SharedBuffer class to "MemoryMappedFile.CreateOrOpen", the bug doesn't appear and worked very well.

happysammy avatar Dec 04 '20 06:12 happysammy