EF CTP5 .Local - ObservableCollection - 这将获得线程安全或使用Dispatcher [英] EF CTP5 .Local - ObservableCollection - Will this get Thread-Safe or using the Dispatcher

查看:63
本文介绍了EF CTP5 .Local - ObservableCollection - 这将获得线程安全或使用Dispatcher的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在colleciton上执行Adds和Deletes时,似乎.Local不是线程安全的而且不使用调度程序。我总体上阅读了很多关于这个问题的文章,有些人说有解决方案,为什么其他人认为这些解决方案并不能全部以b $ b方式运行。

It seems that .Local is not thread safe and not using the dispatcher, when doing Adds and Deletes on the colleciton. I read many articles about this issue in general and some say there are solutions, why others argue that these solutions do not work all ways.

我想知道是否有解决方案是以线程安全的方式使用.Local获得WPF,或者如果MS将来会增强这个功能吗?

I am wondering if there is a solution to have a WPF using the .Local in a thread safe manner, or if MS willy enhance this in the future?

Thankx,Harry

Thankx, Harry

推荐答案

嗨Harry,

Hi Harry,

实体框架的核心组件不是线程安全的,因此.Local只应在单个线程中使用。我们可能会在未来解决EF中的线程安全问题,但目前还没有明确的计划。

The core components of Entity Framework are not thread safe, so .Local should only be used in a single thread. We may address thread safety in EF in the future but there are no definite plans as yet.

~Rowan


这篇关于EF CTP5 .Local - ObservableCollection - 这将获得线程安全或使用Dispatcher的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆