c++ - Increasing MAXIMUM_WAIT_OBJECTS for WaitforMultipleObjects -
what simplest way wait more objects maximum_wait_objects
? msdn lists this:
- create thread wait on
maximum_wait_objects
handles, wait on thread plus other handles. use technique break handles groups ofmaximum_wait_objects
. - call
registerwaitforsingleobject
wait on each handle. wait thread thread pool waits onmaximum_wait_objects
registered objects , assigns worker thread after object signaled or time-out interval expires.
but neither them clear. situation waiting array of on thousand handles threads.
if find waiting on tons of objects might want io completion ports instead. large numbers of parallel operations iocp more efficient.
and name iocp misleading, can use iocp own synchronization structures well.
Comments
Post a Comment