BlockingQueue Class Reference

Inherits from NSObject
Declared in BlockingQueue.h

– offer:

Inserts the specified element into this queue.

- (void)offer:(id)object

Discussion

Inserts the specified element into this queue.

Declared In

BlockingQueue.h

– take

Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.

- (id)take

Discussion

Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.

Declared In

BlockingQueue.h

– drainTo:

Removes all available elements from this queue and adds them to the given collection. This operation may be more efficient than repeatedly polling this queue.

- (void)drainTo:(NSMutableArray *)array

Discussion

Removes all available elements from this queue and adds them to the given collection. This operation may be more efficient than repeatedly polling this queue.

Declared In

BlockingQueue.h

– size

Returns amount of objects in blocking queue.

- (NSUInteger)size

Discussion

Returns amount of objects in blocking queue.

Declared In

BlockingQueue.h