Microsoft Class Server v3.0
- نسخه :Version 3
- نوع فایل : نرم افزار
- زبان : انگلیسی
- سیستم عامل : Windows 32Bit & 64Bit
- تولید کننده : Microsoft
- سال تولید : 2010
Description
The class constructor specifies the size of the queue. Use the CQueue::PutQueueObject to put an item on the queue, and the CQueue::GetQueueObject method to dequeues an item. If the queue is full, the PutQueueObject method blocks until an item is dequeued. If the queue is empty, the GetQueueObject blocks until an item is queued. The template parameter specifies the type of item. For example:The class uses two semaphores to control queuing operations, a "get" semaphore and a "put" semaphore. The GetQueueObject method waits on the "get" semaphore (using the WaitForSingleObject function) and releases the "put" semaphore (using the ReleaseSemaphore function). The PutQueueObject method waits on the "put" semaphore and releases the "get" semaphore. The class uses a critical section to serialize queuing operations among multiple threads.