ASp.NET application. In button click i am accessing one text file and reading content and storing in other destination.
开发者_运维技巧while both users clicking this button at a time deadlock(thread is being used by other process) will occurs so how to handle this i want to read each user one by one can any one suggest method to handle. i am looking to handle with waithandle events so can any one give a code sample for above scenario.
You could use a ReaderWriterLockSlim to synchronize access to a shared resource such as a file.
精彩评论