|
static T | Take< T > (this BlockingCollection< T > collection, T item) |
| Removes the given item from the BlockingCollection if it is present. More...
|
|
static T Org.Apache.REEF.Network.Utilities.BlockingCollectionExtensions.Take< T > |
( |
this BlockingCollection< T > |
collection, |
|
|
T |
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
-
T | The type of BlockingCollection |
- Parameters
-
collection | The BlockingCollection to remove the specified item |
item | The 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: