Microsoft KB Archive/821783

From BetaArchive Wiki
Knowledge Base


The Help topic for the Thread class is not complete

Article ID: 821783

Article Last Modified on 5/24/2007



APPLIES TO

  • Microsoft Visual Studio .NET 2003 Enterprise Architect
  • Microsoft Visual Studio .NET 2003 Professional Edition
  • Microsoft Visual Studio .NET 2003 Enterprise Developer
  • Microsoft Visual Studio .NET 2003 Academic Edition
  • Microsoft Visual Studio .NET 2002 Enterprise Architect
  • Microsoft Visual Studio .NET 2002 Professional Edition
  • Microsoft Visual Studio .NET 2002 Enterprise Developer
  • Microsoft Visual Studio .NET 2002 Academic Edition




SUMMARY

In the Microsoft .NET Framework Class Library documentation, the Help topic for the Thread class is not complete.

For more information, visit the following Microsoft Developer Network (MSDN) Web site:

MORE INFORMATION

The "Thread Safety" section in the existing documentation states the following:

This type is safe for multithreaded operations.


The "Thread Safety" section in the existing documentation should also include the following information:

However, the Microsoft JScript .NET built-in object model is not thread-safe. Therefore, be extra careful when you write or call multithreaded code while you use JScript .NET. Write and call only thread-safe code while you use JScript .NET.

Important Microsoft recommends that you always write and call only thread-safe code, even when you use other programming languages.

While writing multithreaded code, multiple threads may compete for access to shared resources. If multiple threads try to access a shared resource at the same time, race conditions and deadlocks can result. This leads to data loss and to inaccurate results. For example, one thread may update the contents of a shared resource while another thread reads the contents of the same shared resource. This simultaneous access may lead to unwanted and unpredicted results.

To write thread-safe multithreaded code, you must synchronize access to shared resources. Additionally, you may use locks to avoid race conditions.


Keywords: kbvs2005swept kbvs2005doesnotapply kbvs2002sp1sweep kbthreadsync kbthread kbdocs kbprogramming kbdocerr kbbug KB821783