This project has retired. For details please refer to its Attic page.
Apache REEF: Org.Apache.REEF.Network.Utilities.BlockingCollectionExtensions Class Reference
Apache REEF  0.15.0
Retainable Evaluator Execution Framework
Static Public Member Functions | List of all members
Org.Apache.REEF.Network.Utilities.BlockingCollectionExtensions Class Reference

Static Public Member Functions

static T Take< T > (this BlockingCollection< T > collection, T item)
 Removes the given item from the BlockingCollection if it is present. More...
 

Member Function Documentation

static T Org.Apache.REEF.Network.Utilities.BlockingCollectionExtensions.Take< T > ( this BlockingCollection< T >  collection,
item 
)
inlinestatic

Removes the given item from the BlockingCollection if it is present.

If it is not present, it blocks until any item is available in the BlockingCollection. It then removes and returns that first available item.

Template Parameters
TThe type of BlockingCollection
Parameters
collectionThe BlockingCollection to remove the specified item
itemThe item to remove from the BlockingCollection, if it exists
Returns
The specified item, or the first available item if the specified item is not present in the BlockingCollection

The documentation for this class was generated from the following file: