Showing category results for Premier Developer

May 7, 2014
Post comments count0
Post likes count1

Asynchronous and multithreaded programming within VS using the JoinableTaskFactory

Andrew Arnott

Everyone appreciates a fast and responsive UI, and Visual Studio is no exception. Extensions that run in Visual Studio play a significant role in how responsive the IDE will be for its users. Visual Studio has been evolving over the past few cycles to not only improve performance, but also responsiveness during operations that may take a while to e...

andarno
Mar 19, 2014
Post comments count7
Post likes count1

Recommended patterns for CancellationToken

Andrew Arnott

Whether you're doing async work or not, accepting a CancellationToken as a parameter to your method is a great pattern for allowing your caller to express lost interest in the result. Supporting cancelable operations comes with a little bit of extra responsibility on your part. Optional CancellationToken parameter I...

andarno
May 7, 2013
Post comments count0
Post likes count0

Immutable Object Graph updates

Andrew Arnott

In my last post, I introduced a T4 template that constructs efficient and quite capable immutable objects based on the simplest mutable type definition. I also mentioned that the published sample is (necessarily, ala T4 style) open source and hosted online. Two outsiders have already submitted pull requests that have been accepted. Some thoughtful ...

andarno.NETImmutability
Jan 8, 2013
Post comments count0
Post likes count0

Simple immutable objects

Andrew Arnott

We’re all familiar with immutable collections now. But immutability is only as immutable as it is deep. And an immutable collection of mutable objects may not provide the depth you’re looking for. So how can one create an immutable object? Suppose you would define the mutable version like this: An immutable version might be defined ...

andarno.NETImmutability
Jan 7, 2013
Post comments count0
Post likes count0

Immutable collection algorithmic complexity

Andrew Arnott

I received some feedback from my recent BCL blog post on the prerelease of the immutable collections that my algorithm complexity table left a few important entries out. Here is the table again, with more data filled in (particularly around list indexer lookup and enumeration): A noteworthy trait to call out here is that where a List<T>...

andarno.NETImmutability
Dec 28, 2012
Post comments count0
Post likes count0

The cost of context switches

Andrew Arnott

Context switches are not free. But how expensive are they? I wrote a small program to find out, and I’m sharing the program and its results here. I focused on purely context switches (no work is actually performed between context switches). So it’s not a real-world scenario, but it really brings out the hidden costs. Below are the results 500,000 ...

andarno.NETasync
Dec 19, 2012
Post comments count0
Post likes count0

Immutable collections now available

Andrew Arnott

In previous posts, I discussed immutable collections. I’m pleased to say they are now available. Read my announcement on the BCL blog.

andarno.NETImmutability
Jun 8, 2012
Post comments count0
Post likes count0

Update to Visual C++ 2012 Debugger launch extension template

Andrew Arnott

A few days ago I posted about an updated Visual C++ 2012 debugger extensibility project template.  Since then, I realized it had a couple of issues that prevented it from working out of the box.  With those fixed, I also added a demonstration of how to read project properties that aren’t specifically dedicated to debugger support.&n...

andarnoC#CPS
Jun 7, 2012
Post comments count0
Post likes count0

Enable C++ and Javascript project system tracing

Andrew Arnott

I’ve previously posted on how to enable logging in the C++ project system in Visual Studio 2010.  In Visual Studio 2012 we’ve changed the way the Common Project System (aka “CPS”) emits trace messages so below I introduce an updated xml snippet that works in Visual Studio 2012.  Since CPS is now the project system driving JavaScript as well, the be...

andarnoVisual StudioC#
Jun 5, 2012
Post comments count0
Post likes count0

Visual C++ 2012 Debugger Extensibility

Andrew Arnott

Back in Visual C++ 2010 we introduced debugger extensibility so that third party vendors can either add new debugger engines or new ways of launching existing debugger engines for C++ projects.  In Visual C++ 2012 this debugger extensibility has been updated.  Any previous extensions that were compiled against Visual C++ 2010 will have...

andarnoVisual StudioC#