windows phone 七开发中异步线程回调主线程更显UI失败

windows phone 7开发中异步线程回调主线程更显UI失败
网络获取数据是在开辟的新线程中实现的,但是更新UI的时候必然得再回到主线程中来操作了,但是我的代码执行到这里就不走了,直接抛出异常:
 Deployment.Current.Dispatcher.BeginInvoke(() =>
{
  Debug.WriteLine("------------Current.Dispatcher.BeginInvoke----------------");
  foreach (var item in manager)
  {
  ItemContent item2 = item as ItemContent;
  this.News.Add(item2);
  }
 });
上面的manager参数就是网络中得到的数据集合了,想Deloyment来回到主线程去更新UI的,为啥代码执行到此,直接抛出这个异常:
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in System.Windows.dll
Invalid cross-thread access.
望不吝赐教

------解决方案--------------------
manager 这个地方,你用异步操作在网络拿的数据是吧
用互斥让系统的GC把原来线程中临时数据回收掉

这样做:
定义一个全局互斥量 Mutex mutex
在你从网络拿数据的时候写manager 的2端开关锁
mutex.lock()
manager....
mutex.unlock()
然后
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
mutex.lock()

Debug.WriteLine("------------Current.Dispatcher.BeginInvoke----------------");
foreach (var item in manager)
{
ItemContent item2 = item as ItemContent;
this.News.Add(item2);
}
mutex.unlock()

 });
这样 我随手写的 不保证编译 你试试