Author: PeLiPeLi
Date: Apr 8, 2008 03:24
Hi all,
I needed to speed up a very timecritical process.
Therefore I split the whole task into 2 or more threads and hopored
my dual core processor would speed up, by assigning each thread to a
different processor.
This is basically what I did:
for( th=0, Offs=0 ; th
ThreadHandles[th] = CreateThread(NULL, 0, MySlowRoutine,
(LPVOID)Params[th], 0, NULL) ; } ;
for( th=0 ; th
{
WaitForSingleObject( ThreadHandles[th], INFINITE ) ;
CloseHandle( ThreadHandles[th] );
} ;
All the created threads execute the same function, but operate on
different data.
------------------------
|