Multi-Core Programming: Increasing Performance through Software Multithreading

Threading APIs for Microsoft .NET Framework

In 2002, Microsoft introduced a new execution environment, called the Common Language Runtime (CLR), which executes programs in the form of intermediate code, rather than native binaries. This code is conceptually similar to Java bytecodes in that the CLR executes them within a carefully defined virtual machine. And like Java, it frequently uses just-in-time compilation to convert the intermediate code into binary routines on the fly.

The goal of this design was to provide a common execution environment for all the major languages Microsoft supported at the time, notably C++ and Visual Basic, and for a new language, named C#, that Microsoft unveiled with the launch of the CLR and associated technologies. Those technologies included an extensive set of APIs commonly referred to as the .NET Framework. Together, the framework, the CLR, and the tools needed for execution, are referred to as .NET.

The .NET Framework has extensive support for threads. The API provides a substantial subset of the functionality of the Windows API. It does not include some features, such as fibers, but most thread management functions and concepts are present. These are implemented in the .NET Framework class entitled Thread. This section discusses how to use Thread in .NET. The examples are implemented in C#. If you want to use another .NET language, such as C++, Visual Basic .NET, or JScript, consult Microsoft's .NET Framework Class Library Reference, which provides examples of the APIs in all four languages.

Creating Threads

On the...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Programming Languages
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.