2010-01-28 Rolf Bjarne Kvinge <RKvinge@novell.com>
authorRolf Bjarne Kvinge <RKvinge@novell.com>
Thu, 28 Jan 2010 12:05:07 +0000 (12:05 -0000)
committerRolf Bjarne Kvinge <RKvinge@novell.com>
Thu, 28 Jan 2010 12:05:07 +0000 (12:05 -0000)
commita7905ec465bca8da5d62369840b3f8ef13a2abda
tree8d7b6777a73b6144d2ce942bcef493d48dcb7143
parent3ee47a71685a4f21c8902b7df0c07cae9a2a0499
2010-01-28  Rolf Bjarne Kvinge  <RKvinge@novell.com>

* WebClient_2_1.cs: The async events must be invoked on a threadpool
thread if the async method wasn't executed on the main thread, so save
the synchronization context when the async method is called, and post
the event to that synchronization context when done. This is also
required when the async methods are executed on the main thread, since
HttpWebRequest callbacks are now always executed on a threadpool thread.

svn path=/trunk/mcs/; revision=150370
mcs/class/System.Net/System.Net/ChangeLog
mcs/class/System.Net/System.Net/WebClient_2_1.cs