开发者

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

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜