Is there functionality in C# standard libraries analogous to select()?
In particular, the C# progra开发者_高级运维m needs to block waiting on I/O events of multiple file streams (not sockets).
Thanks.
If you're waiting for someone else to write to 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 I/O. Neither of those is very similar to select() in terms of interface, but they can achieve the desired result of fast, asynchronous IO.
加载中,请稍侯......
精彩评论