Photon Server API Documentation v5.0RC1

Public Member Functions | Public Attributes | List of all members
ExitGames.Concurrency.Fibers.ExtendedPoolFiber Class Reference

PoolFiber which supports pausing More...

Inheritance diagram for ExitGames.Concurrency.Fibers.ExtendedPoolFiber:
ExitGames.Concurrency.Fibers.PoolFiber ExitGames.Concurrency.Fibers.IExtendedFiber ExitGames.Concurrency.Fibers.IFiber ExitGames.Concurrency.Fibers.IFiber ExitGames.Concurrency.Core.IScheduler ExitGames.Concurrency.Core.IExecutionContext ExitGames.Concurrency.Core.ISubscriptionRegistry ExitGames.Concurrency.Core.IScheduler ExitGames.Concurrency.Core.IExecutionContext ExitGames.Concurrency.Core.ISubscriptionRegistry

Public Member Functions

 ExtendedPoolFiber ()
 
 ExtendedPoolFiber (IExtendedExecutor executor)
 
bool Pause ()
 
bool Pause (int timeout, Action timeoutAction)
 
bool Pause (int timeout, IFiberAction timeoutAction)
 
bool Resume (Action executeFirstAction=null)
 Resumes fiber. More...
 
bool Resume (IFiberAction executeFirstAction)
 Resumes fiber. More...
 
- Public Member Functions inherited from ExitGames.Concurrency.Fibers.PoolFiber
 PoolFiber (IThreadPool pool, IExecutor executor)
 Construct new instance. More...
 
 PoolFiber (IExecutor executor)
 Create a pool fiber with the default thread pool. More...
 
 PoolFiber ()
 Create a pool fiber with the default thread pool and default executor. More...
 
void Enqueue (Action action)
 Enqueue a single action. More...
 
void Enqueue (IFiberAction action)
 Enqueue a single action. More...
 
void RegisterSubscription (IDisposable toAdd)
 Register subscription to be unsubscribed from when the fiber is disposed. More...
 
bool DeregisterSubscription (IDisposable toRemove)
 Deregister a subscription. More...
 
IDisposable Schedule (IFiberAction action, int firstInMs)
 IScheduler.Schedule(IFiberAction,long) More...
 
IDisposable ScheduleOnInterval (IFiberAction action, int firstInMs, int regularInMs)
 IScheduler.ScheduleOnInterval(Action,long,long) More...
 
IDisposable Schedule (Action action, int firstInMs)
 Schedules an action to be executed once. More...
 
IDisposable ScheduleOnInterval (Action action, int firstInMs, int regularInMs)
 Schedule an action to be executed on a recurring interval. More...
 
void Start ()
 Start consuming actions. More...
 
void Stop ()
 Stop consuming actions. More...
 
void Dispose ()
 Stops the fiber. More...
 

Public Attributes

IExtendedExecutor Executor => this.executor
 
bool IsPaused => this.started == (int)ExecutionState.Paused
 

Additional Inherited Members

- Protected Attributes inherited from ExitGames.Concurrency.Fibers.PoolFiber
readonly object lock = new object()
 
int started = (int)ExecutionState.Created
 
- Properties inherited from ExitGames.Concurrency.Fibers.PoolFiber
ICounter CounterItemsInQueue [get, set]
 
ICounter CounterItemsInExecution [get, set]
 
ICounter CounterEnqueue [get, set]
 
ICounter CounterDequeue [get, set]
 
int NumSubscriptions [get]
 Number of subscriptions. More...
 
- Properties inherited from ExitGames.Concurrency.Fibers.IExtendedFiber
IExtendedExecutor Executor [get]
 
bool IsPaused [get]
 

Detailed Description

PoolFiber which supports pausing

Constructor & Destructor Documentation

◆ ExtendedPoolFiber() [1/2]

ExitGames.Concurrency.Fibers.ExtendedPoolFiber.ExtendedPoolFiber ( )
inline

◆ ExtendedPoolFiber() [2/2]

ExitGames.Concurrency.Fibers.ExtendedPoolFiber.ExtendedPoolFiber ( IExtendedExecutor  executor)
inline

Member Function Documentation

◆ Pause() [1/3]

bool ExitGames.Concurrency.Fibers.ExtendedPoolFiber.Pause ( )
inline

◆ Pause() [2/3]

bool ExitGames.Concurrency.Fibers.ExtendedPoolFiber.Pause ( int  timeout,
Action  timeoutAction 
)
inline

◆ Pause() [3/3]

bool ExitGames.Concurrency.Fibers.ExtendedPoolFiber.Pause ( int  timeout,
IFiberAction  timeoutAction 
)
inline

◆ Resume() [1/2]

bool ExitGames.Concurrency.Fibers.ExtendedPoolFiber.Resume ( Action  executeFirstAction = null)
inline

Resumes fiber.

Parameters
executeFirstAction
Returns

◆ Resume() [2/2]

bool ExitGames.Concurrency.Fibers.ExtendedPoolFiber.Resume ( IFiberAction  executeFirstAction)
inline

Resumes fiber.

Parameters
executeFirstAction
Returns

Implements ExitGames.Concurrency.Fibers.IExtendedFiber.

Member Data Documentation

◆ Executor

IExtendedExecutor ExitGames.Concurrency.Fibers.ExtendedPoolFiber.Executor => this.executor

◆ IsPaused

bool ExitGames.Concurrency.Fibers.ExtendedPoolFiber.IsPaused => this.started == (int)ExecutionState.Paused