CSDN博客

img haiheng

The Producer-Consumer Problem

发表于2004/10/13 10:39:00  703人阅读

WaitForSingleObject(S_Empty, INFINITE);

WaitForSingleObject(S_InputMutex, INFINITE);
g_pInputQueue->push();
ReleaseSemaphore(S_InputMutex, 1, NULL);

ReleaseSemaphore(S_Full, 1, NULL);
//////////////////////////////////////////////////////
WaitForSingleObject(S_Full, INFINITE);

WaitForSingleObject(S_InputMutex, INFINITE);
g_pInputQueue->pop();
ReleaseSemaphore(S_InputMutex, 1, NULL);

ReleaseSemaphore(S_Empty, 1, NULL);
阅读全文
0 0

相关文章推荐

img
取 消
img