[Previous] [Contents] [Next]

AppDomain

In .NET, threads run in something called an AppDomain. You'll sometimes hear that an AppDomain is analogous to a Win32 process in that it offers many of the same benefits, including fault tolerance and the ability to be independently started and stopped. This is a good comparison, but the comparison breaks down in relation to threads. In Win32, a thread is confined to a single process, as you saw when I described context switching earlier. A thread in one process cannot invoke a method in a thread that belongs to another process. In .NET, however, threads can cross AppDomain boundaries, and a method in one thread can call a method in another AppDomain. Therefore, here's a better definition of an AppDomain: a logical process inside of a physical process.

[Previous] [Contents] [Next]