Photon Server API
Public Member Functions | Properties | List of all members
ExitGames.Threading.FailSafeBatchExecutor Class Reference

An IExecutor that can be used for a PoolFiber to catch and log or forward exceptions that happen during execution. More...

Inheritance diagram for ExitGames.Threading.FailSafeBatchExecutor:
ExitGames.Concurrency.Core.IExecutor ExitGames.Threading.ExtendedFailSafeExecutor

Public Member Functions

 FailSafeBatchExecutor ()
 Initializes a new instance of the FailSafeBatchExecutor class that logs all exceptions to a ILogger. More...
 
 FailSafeBatchExecutor (Action< Exception > exceptionHandler)
 Initializes a new instance of the FailSafeBatchExecutor class that forwards all exceptions to a custom exception handler. More...
 
virtual void Execute (System.Collections.Generic.List< Action > actionList)
 Exexutes a list of actions with Execute(Action). More...
 
virtual void Execute (Action action)
 Executes an action and forwards exceptions to the assigned exception handler. More...
 
- Public Member Functions inherited from ExitGames.Concurrency.Core.IExecutor
void Execute (List< Action > toExecute)
 Executes all actions. More...
 

Properties

bool IsEnabled [get, set]
 Gets or sets a value indicating whether the executor is enabled. When disabled, actions will be ignored by executor. The executor is typically disabled at shutdown to prevent any pending actions from being executed. More...
 

Detailed Description

An IExecutor that can be used for a PoolFiber to catch and log or forward exceptions that happen during execution.

Constructor & Destructor Documentation

ExitGames.Threading.FailSafeBatchExecutor.FailSafeBatchExecutor ( )
inline

Initializes a new instance of the FailSafeBatchExecutor class that logs all exceptions to a ILogger.

ExitGames.Threading.FailSafeBatchExecutor.FailSafeBatchExecutor ( Action< Exception >  exceptionHandler)
inline

Initializes a new instance of the FailSafeBatchExecutor class that forwards all exceptions to a custom exception handler.

Parameters
exceptionHandlerThe exception handler.

Member Function Documentation

virtual void ExitGames.Threading.FailSafeBatchExecutor.Execute ( System.Collections.Generic.List< Action >  actionList)
inlinevirtual

Exexutes a list of actions with Execute(Action).

Parameters
actionListThe action list.
virtual void ExitGames.Threading.FailSafeBatchExecutor.Execute ( Action  action)
inlinevirtual

Executes an action and forwards exceptions to the assigned exception handler.

Parameters
actionThe action.

Implements ExitGames.Concurrency.Core.IExecutor.

Reimplemented in ExitGames.Threading.ExtendedFailSafeExecutor.

Property Documentation

bool ExitGames.Threading.FailSafeBatchExecutor.IsEnabled
getset

Gets or sets a value indicating whether the executor is enabled. When disabled, actions will be ignored by executor. The executor is typically disabled at shutdown to prevent any pending actions from being executed.