Thread pool

xiaoxiao2021-03-06  85

WaitforsingleObject (S_Full, Infinite); / * Process Buffer-1 * /

IF (ntasknum> thread_pool_size)

{

Rc = WaitFormultipleObjects (Thread_Pool_SIZE, HSERVICETHREADS, FALSE, INFINITE);

Slot = RC - Wait_Object_0;

}

IF (! (HServiceThreads [slot ] = (Handle) _Beginthread (SingleModelthread, 0, null))))

{

Printf ("_ BeginThread Error!");

Return;

}

ReleaseSemaphore (S_EMPTY, 1, NULL); / * Input buffer 1 * /

转载请注明原文地址:https://www.9cbs.com/read-106962.html

New Post(0)