Skip to content

Latest commit

 

History

History
 
 

CThreadPool

Folders and files

<!--TO READ THIS HELP FILE, RIGHT-CLICK ON THE FILE NAME IN THE
    SOLUTION EXPLORER PANE AND SELECT "VIEW IN BROWSER"-->

<html><head><title>CThreadPool Sample: Demonstrates How to Use a Thread Pool</title></head><body><h1>CThreadPool Sample: Demonstrates How to Use a Thread Pool</h1><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()"></div><p /><p>The CThreadPool sample shows how to use a thread pool in an application and how implementing a thread pool can improve the application's performance.</p><div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Security Note </th></tr><tr><td><p>This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices.</p></td></tr></table></div><h1 class="heading">Building and Running the Sample</h1><div id="sectionSection0" class="seeAlsoNoToggleSection"><h4 class="subHeading">To build the sample</h4><div class="subSection"><ol><li><p>Open the solution ThrdPool.sln.</p></li><li><p>Select the desired configuration (Debug or Release).</p></li><li><p>From the <b>Build</b> menu, click <b>Rebuild All</b>.</p></li></ol></div><h4 class="subHeading">To run the sample within Visual Studio</h4><div class="subSection"><ul><li><p>From the <b>Debug</b> menu, click <b>Start Without Debugging</b>. </p></li></ul></div><h4 class="subHeading">To run the sample from a command window</h4><div class="subSection"><ol><li><p>Change to the directory where the chosen configuration was built (for example, ..\CThreadPool\Debug).</p></li><li><p>Execute ThrdPool.exe.</p></li></ol></div></div><h1 class="heading">Keywords</h1><div id="sectionSection1" class="seeAlsoNoToggleSection"><p>This sample demonstrates the following keywords:</p><p>CThreadPool; CSimpleArray; InterlockedIncrement; GetCurrentThreadId</p></div></div><div id="footer"><div class="footerLine"></div>
          © Microsoft Corporation. All rights reserved.  Send <a href="mailto:DevDocs@microsoft.com?subject=Documentation Feedback :CThreadPool Sample: Demonstrates How to Use a Thread Pool">comments</a> about this topic to Microsoft.
      </div></div></body></html>