On Tue, 14 Oct 2008 04:24:01 -0700, Family Tree Mike
<Fa************ @discussions.mi crosoft.comwrot e:
I have no experience with the book, nor this method, but I found the
quote
here:
http://www.albahari.com/threading/threading.pdf
page 49, under "Asynchrono us Events".
Good find. Only the OP can say for sure if that's the reference they're
talking about, but it seems like a likely candidate. :)
As for the statement itself, I can't confirm or refute it for .NET 3.0,
not having that installed at the moment. In the latest version, looking
at it with Reflector, the only thing that pops out as a potential issue
that I can see is that it possible tries to resolve the URI before
returning. But I'd have to spend more time looking at it to be sure (I'm
just skimming through it).
If that's in fact the case, I suppose to some extent that could be
considered a bug. After all, you do expect the asynchronous call to
return immediately, but if it wastes time trying to look up the URI, that
could take awhile, especially if there's a problem with the network and
you wind up waiting on a timeout.
It's an interesting question. Of course, if that is indeed what
HttpWebClient is doing, it's easy enough to work around by making the call
to DownloadStringA sync(), etc. itself asynchronously (note that WebClient
itself simply relies on the concrete sub-class implementations , so each
implementation may or may not have the same flaw...I've only looked the
HttpWebClient version).
Pete