home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 June (DVD) / DPPRO0605DVD.iso / dotNETSDK / SETUP.EXE / netfxsd1.cab / ReadMe_xml_53________.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Encoding:
Extensible Markup Language  |  2002-06-20  |  2.4 KB  |  52 lines

  1. <?xml version='1.0'?>
  2. <?xml-stylesheet type="text/xsl" href="..\..\..\readme.xsl"?>
  3.  
  4. <sample>
  5. <title>Thread Pools Sample</title>
  6. <title-short>Pools</title-short>
  7. <overview>
  8.    This sample demonstrates use of the ThreadPool class. The sample queues up an asynchronous method call that is executed by a thread from the thread pool managed by the Common Language Runtime.  The method "does some work" and then sets an event indicating that the work has finished.  The main thread waits on the event and then exits.
  9. </overview>
  10. <subdirectory>Technologies\Threading\Pools</subdirectory>
  11. <buildsteps>
  12.    <step>
  13.       Type <richcontent bold="T">BUILD.bat</richcontent>
  14.       <richcontent> from the command line.</richcontent>      
  15.       <example>
  16.          C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\Technologies\Threading\Pools\VB>Build.bat
  17.       </example>
  18.    </step>
  19. </buildsteps>
  20. <runsteps>
  21.    <step>
  22.       Type <richcontent bold="T">AsyncMethod.exe</richcontent><richcontent> from the command line.</richcontent>
  23.       <example>
  24.          C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\Technologies\Threading\Pools\VB>AsyncMethod.exe
  25.       </example>
  26.    </step>   
  27. </runsteps>
  28. <technologies>
  29.    <technology name = "Threading" keyword="T">
  30.       <class name = "ThreadPool" keyword="T">
  31.          When writing managed code, it is suggested that whenever possible, developers use the QueueUserWorkItem() method of the ThreadPool class to implement asynchronous method calls. This sample demonstrates simple use of this type to execute asynchronous behavior.
  32.       </class>
  33.    </technology>
  34.    <technology name = "Thread Synchronization" keyword="T">      
  35.       <class name = "AutoResetEvent" keyword="T">
  36.          The sample's main thread waits on an AutoResetEvent object until it is set by the asynchronous method.  The asynchronous method calls the Set() method when it has finished with its work.
  37.       </class>      
  38.    </technology>   
  39.    <technology name = "Delegates" keyword="T">
  40.       <class name = "WaitCallback" keyword="T">
  41.          The WaitCallback delegate type is used by this sample to create a type-safe callback method for the ThreadPool class to use. 
  42.       </class>      
  43.    </technology>
  44. </technologies>
  45. <keywords>
  46.    <word name="Threads" keyword="T"/>
  47.    <word name="Thread Pools" keyword="T"/>
  48.    <word name="Pooling" keyword="T"/>
  49. </keywords>
  50. </sample>
  51.  
  52.