Click to open or copy the AsyncIO project files.
The AsyncIO sample (also called the "PDC" sample) is a character-mode program for searching the files in a directory tree for a match against a pattern. It uses multiple threads, with each thread processing one file at a time, accumulating its matches. When each thread finishes searching a file, the thread sends the matches contiguously to a standard output.
This sample uses the following keywords:
_except; argument_present; atoi; closehandle; containing_record; createevent; createfile; createfilemapping; createsemaphore; createthread; createvirtualbuffer; createworkqueue; deletecriticalsection; destroyworkqueue; entercriticalsection; enumeratedirectorytree; exit; exitthread; extendvirtualbuffer; findclose; findfirstfile; findnextfile; fprintf; freevirtualbuffer; getexceptioncode; getexceptioninformation; getfullpathname; getlasterror; getstdhandle; getsysteminfo; initializecriticalsection; initializelisthead; insertheadlist; inserttaillist; interlockeddecrement; islistempty; leavecriticalsection; localalloc; localfree; mapviewoffile; processcommandlinearguments; processreadfilecompletion; processrequest; processsearchfile; queuesearchfile; queueworkitem; readfile; readfileex; releasesemaphore; removeentrylist; removeheadlist; round_down; round_up; setevent; setthreadpriority; sprintf; strchr; strcmp; strcpy; switch; terminatethread; tlsalloc; tlsgetvalue; tlssetvalue; tolower; trimvirtualbuffer; unmapviewoffile; virtualalloc; virtualbufferexceptionfilter; virtualfree; waitformultipleobjectsex; waitforsingleobjectex; workerthread; writefile