Monday, December 31, 2012
The await keyword is a new keyword in C# 5.0 which, in tandem with async keyword, allows us to easily author methods which execute asynchronously in regards to the calling code. In previous posts I’ve shown certain issues you should look out for when using these keyword. In this post we’ll look at another issue with the await keyword – how to access the AggregateException. await Only Throws One Exception As we saw in a previous post, await (unlike Task.Wait()) does not wrap a thrown exception in an AggregateException and instead just re-throws the exception thrown within...
Sunday, December 23, 2012
The await keyword is a new keyword in C# 5.0 which, in tandem with async keyword, allows us to easily author methods which execute asynchronously in regards to the calling code. In a previous post I’ve shown a certain issue you should look out for when using the async keyword. In this post we’ll check a similar issue with the await keyword. The await Trap Let’s remember our test code from the previous post: class AsyncClass
public void Process(string s)
Monday, November 12, 2012
async is a new keyword in C# 5.0 which allows us to easily author methods which execute asynchronously in regards to the calling code. The calling code can call the async method and continue its execution until it decides to join with the called method at a later stage. The async Trap Consider the following method: public void Process(string s)
if (s == null) throw new ArgumentNullException("s");
private void ProcessCore(string s)
for (int len = 1; len <= s.Length; len++)
Saturday, January 2, 2010
The Sela Developer Practice (SDP) took place this week at the Crown-Plaza hotel in Tel-Aviv with many presentations on various topics. Sasha and I gave two presentations on Tuesday – one on “Parallel Programming with .NET 4.0 and Visual Studio 2010” and an additional one on “Building Workflow Services with WF 4.0 and WCF 4.0”. Parallel Programming in .NET 4.0 and Visual Studio 2010 In this presentation Sasha and I presented the new Parallel Programming paradigms available in .NET 4.0 and Visual Studio 2010, including the Task Parallel Library (TPL), the Parallel class, Parallel...
Wednesday, November 18, 2009
I attended the PDC breakout session named “Future Directions for C# and Visual Basic” given by Luca Bolognese, the Languages Group Program Manager. This session presented both features that exist in Visual Studio 2010 and features that would be added in future releases, however on my post I’ll concentrate on the new future directions.
Compiler as a Service
An interesting direction the Languages Group is taking is opening up the C# and VB compilers to custom extensions. An example of utilizing this would be adding a custom compile time refactoring rule – either a simple refactor like changing the order...
In the PDC session “Manycore and .NET 4: A Match Made in Visual Studio 2010” by Stephan Toub from Microsoft’s Parallel Computing platform, he reviewed all the work done in the concurrency area for the Visual-Studio 2010 and .NET 4.0 release.
Parallel LINQ was not covered in this session as it is covered in a later one, though the “AsParallel()” extension method and “ParallelEnumerable” class were demonstrated.
.NET 4.0 ThreadPool
Many improvements were made to the .NET 4.0 ThreadPool:
The global thread pool queue was replaced by a lock-free queue, thus removing a severe bottleneck when moving towards a large number of...
Tuesday, November 17, 2009
In this PDC session by Sebastian Burckhardt from Microsoft Research two prototype tools were introduced – Cuzz & FeatherLite.
Cuzz – A Tool for Concurrency Fuzzing
Imagine a situation in which you have a test which doesn’t always pass or an unpredictable behavior which occurs only sometimes. What do you usually do? Stress tests. What else can you possibly do? Use Cuzz.
How do you use Cuzz? You inject the Cuzz DLL into your application binary with a simple command line tool, and what it does is take control of the application threads and their scheduling. By using statistical randomization, Cuzz manipulates...
In their presentation at the PDC “Windows 7 Developer Boot Camp” pre-conference, Mark Russinovich and Arun Kishan highlighted some of the main changes in the Windows 7 and Windows Server 2008 R2 kernel. I’ll highlight some of these changes below.
Note that many of these changes were also explained in Alon’s session at the Windows 7 User Group.
Many Core Platform Support
Windows Server 2008 R2 now supports 256 logical processors, as opposed to “only” 32 or 64 logical processors on the 32 and 64 bit versions of Windows Server 2008. The amazing thing is that the 256 processors limitation is not...
Wednesday, November 11, 2009
Hi, my name is Eran Stiller. No, I am not related to Ben Stiller or Jerry Stiller, although I’m quite used to people asking... I am a senior software consultant, consulting on software challenges regarding the development, design and architecture of both .NET and native Win32 applications. My interests include a wide array of technologies which constantly change over time as I learn newer ones. Currently my main focus lies on server side technologies such as WCF, WF, WF Services, LINQ, Task Parallel Library and Entity Framework, however, as I said, I am constantly on...