我们可以实现交易对C#的对象? [英] Can we implement Transaction on C# objects?

查看:97
本文介绍了我们可以实现交易对C#的对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以使用事务C#的对象。

Can we use transaction on C# objects.

是否所有的交易都只能为关系数据库一样MSSQL,ORACLE等... ??

Does all the Transactions are only for Relational Database like MSSQL, ORACLE, etc...??

感谢。

推荐答案

你所要求被称为软件事务内存。由于这是目前研究的空白区域,有目前没有原生的C#语言支持,你可能会更好使用的对于C#现有的同步选项,如锁定关键字,显示器,等待句柄等。​​

What you are asking is called Software Transactional Memory. Since this is currently an open area of research and there is no native C# language support at the moment, you might be better off using the existing synchronization options for C#, such as the lock keyword, monitors, wait handles, etc.

如果您真的需要先进的交易功能外,还有很多库实现的,例如,&LT;编辑> <打击> <一个href="http://research.microsoft.com/en-us/downloads/FBE1CF9A-C6AC-4BBB-B5E9-D1FDA49ECAD9/default.aspx"相对=nofollow> SXM 通过微软研究院 STM .NET &LT; /编辑>

If you really need advanced transactional features, there are a lot of library implementations, for example, <edit>SXM by Microsoft Research STM.NET</edit>.

这篇关于我们可以实现交易对C#的对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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