async-workflow

Is there an async version of DirectoryInfo.GetFiles / Directory.GetDirectories in dotNet?

家住魔仙堡 提交于 2019-11-27 01:02:15
问题 Is there an asynchronous version of DirectoryInfo.GetFiles / Directory.GetDirectories in dotNet? I'd like to use them in an F# async block, and it'd be nice to have a version that can be called with AsyncCallbacks. Problem is I'm trying to suck in a bunch of directories, probably on SMB mounts over slow network connections, and I don't want a bunch of thread pool threads sitting around waiting for network reads when they could be doing other work. 回答1: No, I don't think there is. The pool