Future.get

T get()

Gets the result of the async operation, blocking if necessary.

This method blocks until the result is available and then returns it. If the async operation threw an exception, that exception will be rethrown by this method.

Returns

The result of the async operation.

Throws

Exception if the async operation failed.

Example:

auto future = asyncNetConnections();
NetConnection[] connections = future.get(); // Blocks until ready