TClientPool.execute

Executes an operation on the first currently active client.

If the operation fails (throws an exception for which rpcFaultFilter is true), the failure is recorded and the next client in the pool is tried.

class TClientPool(Interface)
ResultType
execute
(
ResultType
)
(
scope ResultType delegate work
)
if (
isService!Interface
)

Throws

Any non-rpc exception that occurs, a TCompoundOperationException if all clients failed with an rpc exception (if keepTrying is false).

Examples

interface Foo { string bar(); }
auto poolClient = tClientPool([tClient!Foo(someProtocol)]);
auto result = poolClient.execute((c){ return c.bar(); });

Meta