O'Reilly logo

Professional Visual Basic 2012 and .NET 4.5 Programming by Todd Herman, Gastón Hillar, David McCarter, Rob Windsor, Billy Hollis, Bill Sheldon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

This chapter provided an overview of the task-based programming model introduced with .NET Framework 4 and improved in .NET Framework 4.5. The chapter introduced some of its classes, structures, and enumerations. In order to help you tackle the multicore revolution, it also explained several related concepts used in basic concurrent and parallel programming designs, including the following key points:

  • You have to plan and design with concurrency and parallelism in mind. TPL offers structures that simplify the process of creating code that takes advantage of multicore architectures.
  • You don't need to recompile your code in order to take advantage of additional cores. TPL optimizes the parallel loops and the distributions of tasks in underlying threads using load-balancing scheduling according to the available hardware resources at run time.
  • You can parallelize existing loops and measure the achieved performance gains.
  • You can launch tasks and combine everything you learned so far about lists and arrays to work with multiple tasks and manage their execution.
  • Concurrent collections provide a way to update collections in parallel and concurrent tasks without worrying about complex synchronization mechanisms.
  • You can transform a LINQ query into PLINQ in order to test the speedup achieved with multicore architectures.
  • Backward compatibility is possible with threaded code written in previous versions of Visual Basic and .NET Framework.

The next chapter will dive deep into the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required