Photon Server API Documentation v5.0RC1

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< IFiberAction > actionList)
 Executes a list of actions with Execute(IFiberAction). More...
 
virtual void Execute (IFiberAction 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< IFiberAction > 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

◆ FailSafeBatchExecutor() [1/2]

ExitGames.Threading.FailSafeBatchExecutor.FailSafeBatchExecutor ( )
inline

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

◆ FailSafeBatchExecutor() [2/2]

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

◆ Execute() [1/2]

virtual void ExitGames.Threading.FailSafeBatchExecutor.Execute ( IFiberAction  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.

◆ Execute() [2/2]

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

Executes a list of actions with Execute(IFiberAction).

Parameters
actionListThe action list.

Property Documentation

◆ IsEnabled

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.