org.codehaus.gpars

groovyx.gpars.dataflow
[Java] Class DataflowQueue

java.lang.Object
  groovyx.gpars.dataflow.DataflowQueue
All Implemented Interfaces:
DataflowChannel

@SuppressWarnings({"ClassWithTooManyMethods", "unchecked"})
public class DataflowQueue

Represents a thread-safe data flow stream. Values or DataflowVariables are added using the '<<' operator and safely read once available using the 'val' property. The iterative methods like each(), collect(), iterator(), any(), all() or the for loops work with snapshots of the stream at the time of calling the particular method. For actors and Dataflow Operators the asynchronous non-blocking variants of the getValAsync() methods can be used. They register the request to read a value and will send a message to the actor or operator once the value is available.

Authors:
Vaclav Pech Date: Jun 5, 2009


Field Summary
private DataflowChannelEventOrchestrator eventManager

private java.util.concurrent.LinkedBlockingQueue queue

Stores the received DataflowVariables in the buffer.

private java.lang.Object queueLock

Internal lock

private java.util.Queue requests

Stores unsatisfied requests for values

private java.util.Collection wheneverBoundListeners

A collection of listeners who need to be informed each time the stream is bound to a value

 
Constructor Summary
DataflowQueue()

 
Method Summary
void binaryChoice(DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)

void binaryChoice(Pool pool, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)

void binaryChoice(PGroup group, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)

void binaryChoice(java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)

void binaryChoice(Pool pool, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)

void binaryChoice(PGroup group, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)

void bind(java.lang.Object value)

Adds a DataflowVariable representing the passed in value to the buffer.

DataflowReadChannel chainWith(groovy.lang.Closure closure)

DataflowReadChannel chainWith(Pool pool, groovy.lang.Closure closure)

DataflowReadChannel chainWith(PGroup group, groovy.lang.Closure closure)

DataflowReadChannel chainWith(java.util.Map params, groovy.lang.Closure closure)

DataflowReadChannel chainWith(Pool pool, java.util.Map params, groovy.lang.Closure closure)

DataflowReadChannel chainWith(PGroup group, java.util.Map params, groovy.lang.Closure closure)

void choice(java.util.List outputs, groovy.lang.Closure code)

void choice(Pool pool, java.util.List outputs, groovy.lang.Closure code)

void choice(PGroup group, java.util.List outputs, groovy.lang.Closure code)

void choice(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)

void choice(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)

void choice(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)

private DataflowVariable copyDFV(java.util.Queue from, java.util.Queue to)

protected DataflowVariable createVariable()

Creates a new variable to perform the next data exchange

DataflowReadChannel filter(groovy.lang.Closure closure)

DataflowReadChannel filter(Pool pool, groovy.lang.Closure closure)

DataflowReadChannel filter(PGroup group, groovy.lang.Closure closure)

DataflowReadChannel filter(java.util.Map params, groovy.lang.Closure closure)

DataflowReadChannel filter(Pool pool, java.util.Map params, groovy.lang.Closure closure)

DataflowReadChannel filter(PGroup group, java.util.Map params, groovy.lang.Closure closure)

private void fireOnMessage(java.lang.Object value)

DataflowChannelEventListenerManager getEventManager()

java.util.concurrent.LinkedBlockingQueue getQueue()

java.lang.Object getVal()

Retrieves the value at the head of the buffer.

java.lang.Object getVal(long timeout, java.util.concurrent.TimeUnit units)

Retrieves the value at the head of the buffer.

void getValAsync(MessageStream callback)

Asynchronously retrieves the value at the head of the buffer.

void getValAsync(java.lang.Object attachment, MessageStream callback)

Asynchronously retrieves the value at the head of the buffer.

private DataflowExpression hookWheneverBoundListeners(DataflowExpression expr)

Hooks the registered when bound handlers to the supplied dataflow expression

void into(DataflowWriteChannel target)

void into(Pool pool, DataflowWriteChannel target)

void into(PGroup group, DataflowWriteChannel target)

void into(java.util.Map params, DataflowWriteChannel target)

void into(Pool pool, java.util.Map params, DataflowWriteChannel target)

void into(PGroup group, java.util.Map params, DataflowWriteChannel target)

boolean isBound()

Check if value has been set already for this expression

java.util.Iterator iterator()

Returns an iterator over a current snapshot of the buffer's content.

DataflowWriteChannel leftShift(DataflowReadChannel ref)

Adds a DataflowVariable to the buffer.

DataflowWriteChannel leftShift(java.lang.Object value)

Adds a DataflowVariable representing the passed in value to the buffer.

int length()

Returns the current size of the buffer

DataflowReadChannel merge(DataflowReadChannel other, groovy.lang.Closure closure)

DataflowReadChannel merge(Pool pool, DataflowReadChannel other, groovy.lang.Closure closure)

DataflowReadChannel merge(PGroup group, DataflowReadChannel other, groovy.lang.Closure closure)

DataflowReadChannel merge(java.util.List others, groovy.lang.Closure closure)

DataflowReadChannel merge(Pool pool, java.util.List others, groovy.lang.Closure closure)

DataflowReadChannel merge(PGroup group, java.util.List others, groovy.lang.Closure closure)

DataflowReadChannel merge(java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)

DataflowReadChannel merge(Pool pool, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)

DataflowReadChannel merge(PGroup group, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)

DataflowReadChannel merge(java.util.Map params, java.util.List others, groovy.lang.Closure closure)

DataflowReadChannel merge(Pool pool, java.util.Map params, java.util.List others, groovy.lang.Closure closure)

DataflowReadChannel merge(PGroup group, java.util.Map params, java.util.List others, groovy.lang.Closure closure)

DataflowReadChannel or(groovy.lang.Closure closure)

void or(DataflowWriteChannel target)

DataflowExpression poll()

Retrieves the value at the head of the buffer.

private DataflowVariable retrieveForBind()

Takes the first unsatisfied value request and binds a value on it.

private DataflowVariable retrieveOrCreateVariable()

Checks whether there's a DFV waiting in the queue and retrieves it.

Promise rightShift(groovy.lang.Closure closure)

Schedule closure to be executed by pooled actor after data became available.

void separate(java.util.List outputs, groovy.lang.Closure code)

void separate(Pool pool, java.util.List outputs, groovy.lang.Closure code)

void separate(PGroup group, java.util.List outputs, groovy.lang.Closure code)

void separate(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)

void separate(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)

void separate(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)

void split(DataflowWriteChannel target1, DataflowWriteChannel target2)

void split(Pool pool, DataflowWriteChannel target1, DataflowWriteChannel target2)

void split(PGroup group, DataflowWriteChannel target1, DataflowWriteChannel target2)

void split(java.util.List targets)

void split(Pool pool, java.util.List targets)

void split(PGroup group, java.util.List targets)

void split(java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)

void split(Pool pool, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)

void split(PGroup group, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)

void split(java.util.Map params, java.util.List targets)

void split(Pool pool, java.util.Map params, java.util.List targets)

void split(PGroup group, java.util.Map params, java.util.List targets)

DataflowReadChannel tap(DataflowWriteChannel target)

DataflowReadChannel tap(Pool pool, DataflowWriteChannel target)

DataflowReadChannel tap(PGroup group, DataflowWriteChannel target)

DataflowReadChannel tap(java.util.Map params, DataflowWriteChannel target)

DataflowReadChannel tap(Pool pool, java.util.Map params, DataflowWriteChannel target)

DataflowReadChannel tap(PGroup group, java.util.Map params, DataflowWriteChannel target)

Promise then(groovy.lang.Closure closure)

Schedule closure to be executed after data became available.

Promise then(Pool pool, groovy.lang.Closure closure)

Schedule closure to be executed after data becomes available.

Promise then(PGroup group, groovy.lang.Closure closure)

Schedule closure to be executed after data becomes available.

java.lang.String toString()

void whenBound(groovy.lang.Closure closure)

Schedule closure to be executed by pooled actor after the next data becomes available.

void whenBound(Pool pool, groovy.lang.Closure closure)

Schedule closure to be executed by pooled actor after data becomes available.

void whenBound(PGroup group, groovy.lang.Closure closure)

void whenBound(MessageStream stream)

Send the next bound piece of data to the provided stream when it becomes available.

void wheneverBound(groovy.lang.Closure closure)

Send all pieces of data bound in the future to the provided stream when it becomes available

void wheneverBound(MessageStream stream)

Send all pieces of data bound in the future to the provided stream when it becomes available.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

eventManager

private DataflowChannelEventOrchestrator eventManager


queue

private final java.util.concurrent.LinkedBlockingQueue queue
Stores the received DataflowVariables in the buffer.


queueLock

private final java.lang.Object queueLock
Internal lock


requests

private final java.util.Queue requests
Stores unsatisfied requests for values


wheneverBoundListeners

private final java.util.Collection wheneverBoundListeners
A collection of listeners who need to be informed each time the stream is bound to a value


 
Constructor Detail

DataflowQueue

DataflowQueue()


 
Method Detail

binaryChoice

@Override
public void binaryChoice(DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@Override
public void binaryChoice(Pool pool, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@Override
public void binaryChoice(PGroup group, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@Override
public void binaryChoice(java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@Override
public void binaryChoice(Pool pool, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@Override
public void binaryChoice(PGroup group, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


bind

@Override
public final void bind(java.lang.Object value)
Adds a DataflowVariable representing the passed in value to the buffer.
Parameters:
value - The value to bind to the head of the stream


chainWith

@Override
public final DataflowReadChannel chainWith(groovy.lang.Closure closure)


chainWith

@Override
public final DataflowReadChannel chainWith(Pool pool, groovy.lang.Closure closure)


chainWith

@Override
public DataflowReadChannel chainWith(PGroup group, groovy.lang.Closure closure)


chainWith

@Override
public final DataflowReadChannel chainWith(java.util.Map params, groovy.lang.Closure closure)


chainWith

@Override
public final DataflowReadChannel chainWith(Pool pool, java.util.Map params, groovy.lang.Closure closure)


chainWith

@Override
public DataflowReadChannel chainWith(PGroup group, java.util.Map params, groovy.lang.Closure closure)


choice

@Override
public void choice(java.util.List outputs, groovy.lang.Closure code)


choice

@Override
public void choice(Pool pool, java.util.List outputs, groovy.lang.Closure code)


choice

@Override
public void choice(PGroup group, java.util.List outputs, groovy.lang.Closure code)


choice

@Override
public void choice(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


choice

@Override
public void choice(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


choice

@Override
public void choice(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


copyDFV

private DataflowVariable copyDFV(java.util.Queue from, java.util.Queue to)


createVariable

protected DataflowVariable createVariable()
Creates a new variable to perform the next data exchange
Returns:
The newly created DataflowVariable instance


filter

@Override
public DataflowReadChannel filter(groovy.lang.Closure closure)


filter

@Override
public DataflowReadChannel filter(Pool pool, groovy.lang.Closure closure)


filter

@Override
public DataflowReadChannel filter(PGroup group, groovy.lang.Closure closure)


filter

@Override
public DataflowReadChannel filter(java.util.Map params, groovy.lang.Closure closure)


filter

@Override
public DataflowReadChannel filter(Pool pool, java.util.Map params, groovy.lang.Closure closure)


filter

@Override
public DataflowReadChannel filter(PGroup group, java.util.Map params, groovy.lang.Closure closure)


fireOnMessage

private void fireOnMessage(java.lang.Object value)


getEventManager

@Override
public DataflowChannelEventListenerManager getEventManager()


getQueue

final java.util.concurrent.LinkedBlockingQueue getQueue()


getVal

@Override
public final java.lang.Object getVal()
Retrieves the value at the head of the buffer. Blocks until a value is available.
throws:
InterruptedException If the current thread is interrupted
Returns:
The value bound to the DFV at the head of the stream


getVal

@Override
public final java.lang.Object getVal(long timeout, java.util.concurrent.TimeUnit units)
Retrieves the value at the head of the buffer. Blocks until a value is available.
throws:
InterruptedException If the current thread is interrupted
Parameters:
timeout - The timeout value
units - Units for the timeout
Returns:
The value bound to the DFV at the head of the stream


getValAsync

@Override
public final void getValAsync(MessageStream callback)
Asynchronously retrieves the value at the head of the buffer. Sends the actual value of the variable as a message back the the supplied actor once the value has been bound. The actor can perform other activities or release a thread back to the pool by calling react() waiting for the message with the value of the Dataflow Variable.
Parameters:
callback - The actor to notify when a value is bound


getValAsync

@Override
public final void getValAsync(java.lang.Object attachment, MessageStream callback)
Asynchronously retrieves the value at the head of the buffer. Sends a message back the the supplied actor / operator with a map holding the supplied index under the 'index' key and the actual value of the variable under the 'result' key once the value has been bound. The actor/operator can perform other activities or release a thread back to the pool by calling react() waiting for the message with the value of the Dataflow Variable.
Parameters:
attachment - An arbitrary value to identify operator channels and so match requests and replies
callback - The actor / operator to notify when a value is bound


hookWheneverBoundListeners

private DataflowExpression hookWheneverBoundListeners(DataflowExpression expr)
Hooks the registered when bound handlers to the supplied dataflow expression
Parameters:
expr - The expression to hook all the when bound listeners to
Returns:
The supplied expression handler to allow method chaining


into

@Override
public void into(DataflowWriteChannel target)


into

@Override
public void into(Pool pool, DataflowWriteChannel target)


into

@Override
public void into(PGroup group, DataflowWriteChannel target)


into

@Override
public void into(java.util.Map params, DataflowWriteChannel target)


into

@Override
public void into(Pool pool, java.util.Map params, DataflowWriteChannel target)


into

@Override
public void into(PGroup group, java.util.Map params, DataflowWriteChannel target)


isBound

@Override
public final boolean isBound()
Check if value has been set already for this expression
Returns:
true if bound already


iterator

public final java.util.Iterator iterator()
Returns an iterator over a current snapshot of the buffer's content. The next() method returns actual values not the DataflowVariables.
Returns:
AN iterator over all DFVs in the queue


leftShift

@Override
@SuppressWarnings("unchecked")
public final DataflowWriteChannel leftShift(DataflowReadChannel ref)
Adds a DataflowVariable to the buffer. Implementation detail - in fact another DFV is added to the buffer and an asynchronous 'whenBound' handler is registered with the supplied DFV to update the one stored in the buffer.
Parameters:
ref - The DFV to add to the stream


leftShift

@Override
public final DataflowWriteChannel leftShift(java.lang.Object value)
Adds a DataflowVariable representing the passed in value to the buffer.
Parameters:
value - The value to bind to the head of the stream


length

@Override
public final int length()
Returns the current size of the buffer
Returns:
Number of DFVs in the queue


merge

@Override
public DataflowReadChannel merge(DataflowReadChannel other, groovy.lang.Closure closure)


merge

@Override
public DataflowReadChannel merge(Pool pool, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@Override
public DataflowReadChannel merge(PGroup group, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@Override
public DataflowReadChannel merge(java.util.List others, groovy.lang.Closure closure)


merge

@Override
public DataflowReadChannel merge(Pool pool, java.util.List others, groovy.lang.Closure closure)


merge

@Override
public DataflowReadChannel merge(PGroup group, java.util.List others, groovy.lang.Closure closure)


merge

@Override
public DataflowReadChannel merge(java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@Override
public DataflowReadChannel merge(Pool pool, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@Override
public DataflowReadChannel merge(PGroup group, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@Override
public DataflowReadChannel merge(java.util.Map params, java.util.List others, groovy.lang.Closure closure)


merge

@Override
public DataflowReadChannel merge(Pool pool, java.util.Map params, java.util.List others, groovy.lang.Closure closure)


merge

@Override
public DataflowReadChannel merge(PGroup group, java.util.Map params, java.util.List others, groovy.lang.Closure closure)


or

@Override
public DataflowReadChannel or(groovy.lang.Closure closure)


or

@Override
public void or(DataflowWriteChannel target)


poll

@Override
public final DataflowExpression poll()
Retrieves the value at the head of the buffer. Returns null, if no value is available.
Returns:
The value bound to the DFV at the head of the stream or null


retrieveForBind

private DataflowVariable retrieveForBind()
Takes the first unsatisfied value request and binds a value on it. If there are no unsatisfied value requests, a new DFV is stored in the queue.
Returns:
The DFV to bind the value on


retrieveOrCreateVariable

private DataflowVariable retrieveOrCreateVariable()
Checks whether there's a DFV waiting in the queue and retrieves it. If not, a new unmatched value request, represented by a new DFV, is added to the requests queue.
Returns:
The DFV to wait for value on


rightShift

@Override
public final Promise rightShift(groovy.lang.Closure closure)
Schedule closure to be executed by pooled actor after data became available. It is important to notice that even if the expression is already bound the execution of closure will not happen immediately but will be scheduled
Parameters:
closure - closure to execute when data becomes available. The closure should take at most one argument.


separate

@Override
public void separate(java.util.List outputs, groovy.lang.Closure code)


separate

@Override
public void separate(Pool pool, java.util.List outputs, groovy.lang.Closure code)


separate

@Override
public void separate(PGroup group, java.util.List outputs, groovy.lang.Closure code)


separate

@Override
public void separate(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


separate

@Override
public void separate(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


separate

@Override
public void separate(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


split

@Override
public void split(DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@Override
public void split(Pool pool, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@Override
public void split(PGroup group, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@Override
public void split(java.util.List targets)


split

@Override
public void split(Pool pool, java.util.List targets)


split

@Override
public void split(PGroup group, java.util.List targets)


split

@Override
public void split(java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@Override
public void split(Pool pool, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@Override
public void split(PGroup group, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@Override
public void split(java.util.Map params, java.util.List targets)


split

@Override
public void split(Pool pool, java.util.Map params, java.util.List targets)


split

@Override
public void split(PGroup group, java.util.Map params, java.util.List targets)


tap

@Override
public DataflowReadChannel tap(DataflowWriteChannel target)


tap

@Override
public DataflowReadChannel tap(Pool pool, DataflowWriteChannel target)


tap

@Override
public DataflowReadChannel tap(PGroup group, DataflowWriteChannel target)


tap

@Override
public DataflowReadChannel tap(java.util.Map params, DataflowWriteChannel target)


tap

@Override
public DataflowReadChannel tap(Pool pool, java.util.Map params, DataflowWriteChannel target)


tap

@Override
public DataflowReadChannel tap(PGroup group, java.util.Map params, DataflowWriteChannel target)


then

@Override
public final Promise then(groovy.lang.Closure closure)
Schedule closure to be executed after data became available. It is important to notice that even if the expression is already bound the execution of closure will not happen immediately but will be scheduled
Parameters:
closure - closure to execute when data becomes available. The closure should take at most one argument.
Returns:
A promise for the results of the supplied closure. This allows for chaining of then() method calls.


then

@Override
public Promise then(Pool pool, groovy.lang.Closure closure)
Schedule closure to be executed after data becomes available. It is important to notice that even if the expression is already bound the execution of closure will not happen immediately but will be scheduled.
Parameters:
pool - The thread pool to use for task scheduling for asynchronous message delivery
closure - closure to execute when data becomes available. The closure should take at most one argument.
Returns:
A promise for the results of the supplied closure. This allows for chaining of then() method calls.


then

@Override
public Promise then(PGroup group, groovy.lang.Closure closure)
Schedule closure to be executed after data becomes available. It is important to notice that even if the expression is already bound the execution of closure will not happen immediately but will be scheduled.
Parameters:
group - The PGroup to use for task scheduling for asynchronous message delivery
closure - closure to execute when data becomes available. The closure should take at most one argument.
Returns:
A promise for the results of the supplied closure. This allows for chaining of then() method calls.


toString

@Override
public java.lang.String toString()


whenBound

@Override
public final void whenBound(groovy.lang.Closure closure)
Schedule closure to be executed by pooled actor after the next data becomes available. It is important to notice that even if the expression is already bound the execution of closure will not happen immediately but will be scheduled.
Parameters:
closure - closure to execute when data becomes available. The closure should take at most one argument.


whenBound

@Override
public final void whenBound(Pool pool, groovy.lang.Closure closure)
Schedule closure to be executed by pooled actor after data becomes available. It is important to notice that even if the expression is already bound the execution of closure will not happen immediately but will be scheduled.
Parameters:
pool - The thread pool to use for task scheduling for asynchronous message delivery
closure - closure to execute when data becomes available. The closure should take at most one argument.


whenBound

@Override
public void whenBound(PGroup group, groovy.lang.Closure closure)


whenBound

@Override
public final void whenBound(MessageStream stream)
Send the next bound piece of data to the provided stream when it becomes available.
Parameters:
stream - stream where to send result


wheneverBound

@Override
public final void wheneverBound(groovy.lang.Closure closure)
Send all pieces of data bound in the future to the provided stream when it becomes available. *
Parameters:
closure - closure to execute when data becomes available. The closure should take at most one argument.


wheneverBound

@Override
public final void wheneverBound(MessageStream stream)
Send all pieces of data bound in the future to the provided stream when it becomes available.
Parameters:
stream - stream where to send result


 

Copyright © 2008–2012 Václav Pech. All Rights Reserved.