STM.NET on DevLabsToday we made available STM.NET on MSDN DevLabs. STM.NET is an experimental enhanced version of .NET Framework 4 Beta 1 that enables software transactional memory for C# programmers. Transactional memory is a technology that frees developers from worrying about the mechanics of fine-grained locking and synchronization in multithreaded applications by providing transactional semantics for reading and writing to memory. It enables developers to focus on application logic instead of the details of memory I/O when building multi-core and many-core programs. Building TransactionsSTM.NET makes it easy to declare a region of code as atomic. Simply write a function or lambda containing the code that you’d like to transact and pass it to the Atomic.Do delegate. Just like SQL code in a database transaction, this block of code will run as if isolated from other transacted blocks and either it completes successfully or rolls back the complete transaction if there is an error, all without you having to explicitly lock anything. How Does it Work?The .NET Framework’s just-in-time compiler rewrites the code within an atomic block to use transactional memory. As a result, a significant amount of .NET code works without changes, including code that uses locks. STM.NET also provides integration with System.Transactions so you can coordinate your atomic memory operations with existing transactional resource managers like MSMQ.
Continue at
http://blogs.msdn.com/somasegar/archive/2009/07/27/stm-net-in-devlabs.aspx Send via e-mail | Submit to Digg | Add to Live Favorites
http://feeds.bink.nu/~r/binkdotnu/~3/Ri6w67djIJw/stm-net-on-devlabs.aspx