Skip Navigation Links


.NET memory allocation profiling and Tasks

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 4/4/2013 5:26:00 PM

'The .NET Framework blog published this morning a guest post from yours truly on .NET Memory Allocation Profiling with Visual Studio 2012.  As you're trying to improve the performance, throughput, and memory usage of code that uses Tasks, the described profiler in Visual Studio can be a valuable tool in your tool belt (of course, the example I use in that post to highlight the profiler's capabilities is one that uses Task and async/await).  I hope you find the post helpful.'

Read full article

Tasks, Monads, and LINQ

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 4/3/2013 5:53:21 PM

'A few years back, Wes Dyer wrote a great post on monads, and more recently, Eric Lippert wrote a terrific blog series exploring monads and C#. In that series, Eric alluded to Task<TResult> several times, so I thought I’d share a few related thoughts on Task<TResult> and the async/await keywords. As both Wes and Eric highlight, a monad is a triple consisting of a type, a Unit function (often called Return), and a Bind function. If the type in question is Task<T>, w(...)'

Read full article

Temporary Post Used For Theme Detection (eb8c9b1c-e2d1-4297-ae7e-9ea6c7d07e34 - 3bfe001a-32de-4114-a6b4-4005b770f6d7)

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 4/3/2013 5:23:19 PM

'This is a temporary post that was not deleted. Please delete this manually. (d656b880-8161-4527-8d9e-edb5f4576b6e - 3bfe001a-32de-4114-a6b4-4005b770f6d7)'

Read full article

"Invoke the method with await"... ugh!

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 3/13/2013 5:08:55 PM

'I can be a bit sensitive when it comes to language and how concepts are conveyed.  I think it’s important to be accurate, even if not precise, when describing what something is or how to use it, as otherwise the folks to whom you’re communicating can easily form the wrong mental model for that thing.  Having a good mental model for something is important in then being able to reason about the thing in question and to correctly infer other uses and behaviors. T(...)'

Read full article

MVP Summit presentation on async

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 2/20/2013 6:51:03 PM

'Lucian Wischik and I presented an "async clinic" at the MVP Summit in Bellevue this week.  The async/await keywords in C# and Visual Basic drastically simplify asynchronous programming, but that of course doesn't mean that using them is without any gotchas: the goal of the discussion was to highlight some of the key areas in which we see developers struggling with asynchronous development and to help provide guidance on avoiding and overcoming those roadbloc(...)'

Read full article

Psychic Debugging of Async Methods

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 1/29/2013 1:34:06 AM

'These days it’s not uncommon for me to receive an email or read a forum post from someone concerned about a problem they’re experiencing with an async method they’ve written, and they’re seeking help debugging the issue.  Sometimes plenty of information about the bug is conveyed, but other times the communication is void of anything more than a root problem statement.  That’s when I engage my powers of psychic debugging to suggest what the root cause might be, without actu(...)'

Read full article

Cooperatively pausing async methods

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 1/13/2013 10:27:02 PM

'Recently I was writing an app that processed a bunch of files asynchronously.  As with the Windows copy file dialog, I wanted to be able to provide the user with a button that would pause the processing operation. To achieve that, I implemented a simple mechanism that would allow me to pass a “pause token” into the async method, which the async method could asynchronous wait on at appropriate points.  public async Task ProcessFiles(     IEnumerab(...)'

Read full article

C# memory model articles

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 12/14/2012 8:32:50 PM

'Igor Ostrovsky is one of the minds behind the parallel programming support in the .NET Framework.  Igor's recently written a great set of articles for MSDN Magazine to cover "The C# Memory Model in Theory and Practice".  Part 1 is available now in the December 2012 issue, and it's a great read.'

Read full article

PLINQ and Int32.MaxValue

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 11/17/2012 1:19:25 AM

'In both .NET 4 and .NET 4.5, PLINQ supports enumerables with up to Int32.MaxValue elements.  Beyond that limit, PLINQ will throw an overflow exception.  LINQ to Objects itself has this limitation with certain query operators (such as the indexed Select operator which counts the elements processed), but PLINQ has it with more. This limitation impacts so few scenarios that it’s relatively benign and I rarely hear about it.  That said, it does come up now and again, and(...)'

Read full article

How do I cancel non-cancelable async operations?

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 10/5/2012 4:29:25 PM

'This is a question I hear relatively frequently: “I have an async operation that’s not cancelable.  How do I cancel it?” The construction of the question often makes me chuckle, but I understand and appreciate what’s really being asked.  The developer typically isn’t asking how to cancel the operation itself (if they are asking that, the answer is simple: it’s not cancelable!), but rather they’re asking how to allow their program’s execution to continue upon a cance(...)'

Read full article

New TaskCreationOptions and TaskContinuationOptions in .NET 4.5

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 9/22/2012 3:57:56 PM

'Astute users of the Task Parallel Library might have noticed three new options available across TaskCreationOptions and TaskContinuationOptions in .NET 4.5: DenyChildAttach, HideScheduler, and (on TaskContinuationOptions) LazyCancellation.  I wanted to take a few minutes to share more about what these are and why we added them. DenyChildAttach As a reminder, when a Task is created with TaskCreationOptions.AttachedToParent or TaskContinuationOptions.AttachedToParent, the creat(...)'

Read full article

Forking in async methods

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 9/11/2012 3:55:26 PM

'Given that .NET 4.5 has only recently been released in its final form, it’s not surprising that many folks are still very new to the async/await keywords and have misconceptions about what they are and what they do (I’ve tried to clarify some of these in this Async/Await FAQ).  One of the more common misconceptions is that a method marked as async forces asynchrony, and that’s not true: if there are no awaits in a method marked as async, or if none of the awaits in the async me(...)'

Read full article

TPL Dataflow NuGet Package for .NET 4.5

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 8/22/2012 12:19:49 AM

'As just announced on the Base Class Libraries (BCL) team blog, the RTM release of TPL Dataflow is now available. Enjoy :)'

Read full article

Implementing Then with Await

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 8/15/2012 11:00:26 PM

'In a post a while ago, I talked about sequential composition of asynchronous operations.  Now that we have the async/await keywords in C# and Visual Basic, such composition is trivial, and async/await are indeed the recommended way to achieve such composition with these languages. However, in that post I also described a few “Then” methods (similar methods are now available in JavaScript and VC++), and I thought it’d be fun to quickly show how Then can be implemented in terms (...)'

Read full article

Processing tasks as they complete

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 8/2/2012 2:58:27 PM

'Recently I’ve had several folks ask me about how to process the results of tasks as those tasks complete. A developer will have multiple tasks representing asynchronous operations they’ve initiated, and they want to process the results of these tasks, e.g. List<Task<T>> tasks = …; foreach(var t in tasks)     catch(OperationCanceledException)     catch(Exception exc) } This approach is fine for many situat(...)'

Read full article

ExecutionContext vs SynchronizationContext

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 6/15/2012 6:10:42 PM

'I’ve been asked a few times recently various questions about ExecutionContext and SynchronizationContext, for example what the differences are between them, what it means to “flow” them, and how they relate to the new async/await keywords in C# and Visual Basic.  I thought I’d try to tackle some of those questions here. WARNING: This post goes deep into an advanced area of .NET that most developers never need to think about. What is ExecutionContext, and what does it mean to(...)'

Read full article

Using async/await in WinRT async operations

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 6/15/2012 12:25:49 AM

'Several weeks ago, I wrote a post for the Windows 8 app developer blog that was all about using await and AsTask to consume WinRT async operations.  I've now published a follow-up post that's all about exposing .NET tasks as WinRT async operation.  In a sense, you can think about the first post as showing how to convert from WinRT async operations to .NET tasks, and you can think about the second post as showing how to convert from .NET tasks to WinRT async operations(...)'

Read full article

Performance consideration for Async/Await and MarshalByRefObject

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 6/1/2012 6:59:00 AM

'In the previous "What's New for Parallelism in Visual Studio 2012 RC" blog post, I mentioned briefly that for the .NET 4.5 RC release, StreamReader.ReadLineAsync experienced a significant performance improvement.  There's an intriguing story behind that, one I thought I'd share here.  It has to do with some interesting interactions between certain optimizations in the BCL and how the C# and Visual Basic compilers compile async methods.  Before I describe the cha(...)'

Read full article

What’s New for Parallelism in Visual Studio 2012 RC

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 5/31/2012 7:57:00 PM

'In September, I blogged about what was new for parallelism and asynchrony in the Visual Studio 2012 Developer Preview, and in February I followed that up with a post on what was new in the Beta.  Now that Visual Studio 2012 Release Candidate is out, I want to share a few thoughts on what’s new in the Release Candidate. Most new features for a release of Visual Studio and the .NET Framework show up prior to a Release Candidate, which is typically focused on polish, perfor(...)'

Read full article

ConcurrentQueue holding on to a few dequeued elements

Author : Stephen Toub - MSFT      Blog : Parallel Programming with .NET      Date : 5/8/2012 5:43:13 PM

'Since .NET 4’s release, I’ve received several questions about a peculiar behavior of ConcurrentQueue<T> having to do with memory management. With Queue<T>, List<T>, and other such data structures in the .NET Framework, when you remove an element from the collection, the collection internally wipes out its reference to the stored element, e.g. class MyQueue<T> } This ensures that the data structure won’t hold on to the dequeued data in the(...)'

Read full article

Page 1 , Total 4 1 2 3 4 Last

Bloggers

active bloggers in the last 24 hrs. Number shown in the bracket represents number of posts published in past 24 hrs,


other authors(56)

Vikram Karve(4)

Jeevan Jyoti(3)

bobbysing(2)

BUTTERFLIES OF TIME(2)

Fidarose Isha(2)

N.GURURAJ.(2)

R.D. Bhalekar(2)

Sakshi Garg(2)

Venkataramanan Ramasethu(2)

AbhiLaSH RuHeLa(1)

Abhishek Pandey(1)

Abi(1)

Aditi(1)

Ajay Shah(1)

Akhilesh(1)

Anil(1)

Anil P(1)

Ankur(1)

Anu Lal(1)

Anu Varma(1)

anupriya(1)

AS...(1)

ashok(1)

bdoza(1)

Bharathy(1)

celestialrays(1)

chaoticplanner(1)

Dew(1)

Dinakarr(1)

Divya Kudua(1)

Ekta khetan(1)

ephemeral desires(1)

Familycook(1)

Govind Kumar(1)

hAnGp(1)

Hari Chandana P(1)

Harimohan(1)

I for an Eye(1)

Insignia(1)

IS(1)

J.A. Kumar(1)

Jayasri Ravi(1)

Jeevan Jyoti(1)

Joshua S(1)

Ka Jo(1)

KALVA(1)

Kalyan P(1)

KK(1)

KParthasarathi(1)

Krishna Rao(1)

Madhaw Tiwari(1)

Mahima Kohli(1)

Meher(1)

Mihir Govilkar(1)

Mr Rancorous(1)

MUNZ TDT(1)

Mythreyi(1)

Nayna Kanabar(1)

Newsline Features and Press Agency, Agra - 282005 [U.P.](1)

Nidz(1)

Nik P(1)

Nikhil Sheth(1)

Nishant Chaturvedi(1)

Nivedita Thadani(1)

Nona(1)

Ordinary Gal(1)

palash ranjan khound(1)

parth joshi(1)

Phalgunn Maharishi(1)

pinksocks(1)

pixie(1)

Prabal(1)

Prahallad Panda(1)

Priya(1)

rahul(1)

Raksha(1)

Rama Subramanian(1)

Ramanujam Sridhar(1)

ravi dabas(1)

Richa Singh(1)

Ritcha(1)

Rohit Kaveeshwar(1)

RWABhagidari.blogspot.com(1)

Sandhya(1)

Sanjeev(1)

Santanu(1)

Santosh Bangar(1)

ScottGu(1)

Sharjeel(1)

sheetal paliwal(1)

shibu V(1)

Shinymist(1)

Shobhaa De(1)

shoOOonya(1)

Shrikant Lokhande(1)

Shriti(1)

soraya nulliah(1)

Sriram Khé(1)

Srivalli(1)

Subha(1)

Suchismita(1)

Sushma Harish(1)

Vashi Chandiramani(1)

Vasudev Ram(1)

Vasudha Rao(1)

Vatsala Dorai Rajan(1)

Vijay Rajput(1)

winnie(1)

अफ़लातून अफ़लू(1)

மதி (GS)(1)