Select () for multiple file I / O in C #?

Is there functionality in C # standard libraries similar to select () ?

In particular, a C # program needs to block waiting for I / O events on multiple file streams (not sockets).

Thank.

+2


source to share


1 answer


If you are waiting for someone else to write the file, you can use System.IO.FileSystemWatcher

and look for change events. Otherwise, you can always use FileStream.BeginRead

and FileStream.BeginWrite

for asynchronous IO. None of them are very similar in select()

terms of interface, but they can achieve the desired result of fast asynchronous I / O.



+1


source







All Articles