On Tue, 20 May 2008 04:27:37 -0700, Ryan Liu <rl**@powercati.comwrote:
Is Async I/O (e.g. NetworkStream.Begin/End Read/Write) always better
than
synchronous I/O? At least as good?
"Better" is far too vague to really able to answer. Except perhaps that
inasmuch as "better" can carry many meanings, then obviously one
particular i/o paradigm cannot possibly always be "better". :)
When I don't concern about easy or difficult to write code, should I
always
use Async I/O?
Personally, I like the async i/o API and don't find it more difficult. If
anything, I find it less difficult. But I have a fair amount of
experience with asynchronous i/o programming and the async i/o API works
well for me. Even so, I don't use it when I'm dealing with brief i/o or
i/o on a small scale that I know won't be interrupted, even if that i/o
will take longer.
Sometimes simplicity is "better" than efficiency.
Pete