Photon Server API
Public Member Functions | Properties | List of all members
ExitGames.Concurrency.Fibers.ThreadFiber Class Reference

Fiber implementation backed by a dedicated thread. IFiber More...

Inheritance diagram for ExitGames.Concurrency.Fibers.ThreadFiber:
ExitGames.Concurrency.Fibers.IFiber ExitGames.Concurrency.Core.ISubscriptionRegistry ExitGames.Concurrency.Core.IExecutionContext ExitGames.Concurrency.Core.IScheduler

Public Member Functions

 ThreadFiber ()
 Create a thread fiber with the default queue. More...
 
 ThreadFiber (IQueue queue)
 Creates a thread fiber with a specified queue. More...
 
 ThreadFiber (string threadName)
 Creates a thread fiber with a specified name. More...
 
 ThreadFiber (IQueue queue, string threadName)
 
 ThreadFiber (IQueue queue, string threadName, bool isBackground, ThreadPriority priority)
 Creates a thread fiber. More...
 
void Enqueue (Action action)
 Enqueue a single action. More...
 
void RegisterSubscription (IDisposable toAdd)
 
bool DeregisterSubscription (IDisposable toRemove)
 
IDisposable Schedule (Action action, long firstInMs)
 IScheduler.Schedule(Action,long) More...
 
IDisposable ScheduleOnInterval (Action action, long firstInMs, long regularInMs)
 IScheduler.ScheduleOnInterval(Action,long,long) More...
 
void Start ()
 IFiber.Start More...
 
void Join ()
 
void Dispose ()
 Stops the thread. More...
 

Properties

Thread Thread [get]
 IFiber More...
 
int NumSubscriptions [get]
 

Detailed Description

Fiber implementation backed by a dedicated thread. IFiber

Constructor & Destructor Documentation

ExitGames.Concurrency.Fibers.ThreadFiber.ThreadFiber ( )
inline

Create a thread fiber with the default queue.

ExitGames.Concurrency.Fibers.ThreadFiber.ThreadFiber ( IQueue  queue)
inline

Creates a thread fiber with a specified queue.

Parameters
queue
ExitGames.Concurrency.Fibers.ThreadFiber.ThreadFiber ( string  threadName)
inline

Creates a thread fiber with a specified name.

///

Parameters
threadName
ExitGames.Concurrency.Fibers.ThreadFiber.ThreadFiber ( IQueue  queue,
string  threadName 
)
inline
ExitGames.Concurrency.Fibers.ThreadFiber.ThreadFiber ( IQueue  queue,
string  threadName,
bool  isBackground,
ThreadPriority  priority 
)
inline

Creates a thread fiber.

Parameters
queue
threadName
isBackground
priority

Member Function Documentation

bool ExitGames.Concurrency.Fibers.ThreadFiber.DeregisterSubscription ( IDisposable  toRemove)
inline

summary> Number of subscriptions. /summary>

Implements ExitGames.Concurrency.Core.ISubscriptionRegistry.

void ExitGames.Concurrency.Fibers.ThreadFiber.Dispose ( )
inline

Stops the thread.

void ExitGames.Concurrency.Fibers.ThreadFiber.Enqueue ( Action  action)
inline

Enqueue a single action.

Parameters
action

summary> Register subscription to be unsubcribed from when the fiber is disposed. /summary> param name="toAdd">

Implements ExitGames.Concurrency.Core.IExecutionContext.

void ExitGames.Concurrency.Fibers.ThreadFiber.Join ( )
inline
void ExitGames.Concurrency.Fibers.ThreadFiber.RegisterSubscription ( IDisposable  toAdd)
inline

summary> Deregister a subscription. /summary> param name="toRemove">

returns>

Implements ExitGames.Concurrency.Core.ISubscriptionRegistry.

IDisposable ExitGames.Concurrency.Fibers.ThreadFiber.Schedule ( Action  action,
long  firstInMs 
)
inline

IScheduler.Schedule(Action,long)

Parameters
action
firstInMs
Returns

Implements ExitGames.Concurrency.Core.IScheduler.

IDisposable ExitGames.Concurrency.Fibers.ThreadFiber.ScheduleOnInterval ( Action  action,
long  firstInMs,
long  regularInMs 
)
inline
void ExitGames.Concurrency.Fibers.ThreadFiber.Start ( )
inline

IFiber.Start

summary> Calls join on the thread. /summary>

Implements ExitGames.Concurrency.Fibers.IFiber.

Property Documentation

int ExitGames.Concurrency.Fibers.ThreadFiber.NumSubscriptions
get
Thread ExitGames.Concurrency.Fibers.ThreadFiber.Thread
get