开发者

Synchronous and Asynchronous operation on reading a file using multithreading

开发者 https://www.devze.com 2023-02-10 08:54 出处:网络
I have scenario like reading two text files using multithreading in c#.net. How can i implement this scenario 开发者_开发问答synchronously using multithreading.Lock the access to the file so that only

I have scenario like reading two text files using multithreading in c#.net. How can i implement this scenario 开发者_开发问答synchronously using multithreading.


Lock the access to the file so that only one thread can access it.

Or maybe you intent for the results of the read to be processed shyncronouslly just invoke an event on both threads when done and lock on the event.

0

精彩评论

暂无评论...
验证码 换一张
取 消