Photon Server API Documentation v5.0RC1

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...
 
IDisposable Schedule (Action action, int firstInMs)
 IScheduler.Schedule(Action,int) More...
 
IDisposable Schedule (IFiberAction action, int firstInMs)
 IScheduler.Schedule(IFiberAction,int) More...
 
IDisposable ScheduleOnInterval (Action action, int firstInMs, int regularInMs)
 IScheduler.ScheduleOnInterval(Action, int, int) More...
 
IDisposable ScheduleOnInterval (IFiberAction action, int firstInMs, int regularInMs)
 IScheduler.ScheduleOnInterval(IFiberAction, int, int) More...
 
void Join ()
 
void Dispose ()
 Stops the thread. More...
 
- Public Member Functions inherited from ExitGames.Concurrency.Fibers.IFiber
void Start ()
 Start consuming actions. More...
 
- Public Member Functions inherited from ExitGames.Concurrency.Core.ISubscriptionRegistry
void RegisterSubscription (IDisposable toAdd)
 Register subscription to be unsubcribed from when the fiber is disposed. /summary> param name="toAdd"> More...
 
bool DeregisterSubscription (IDisposable toRemove)
 
- Public Member Functions inherited from ExitGames.Concurrency.Core.IExecutionContext
void Enqueue (IFiberAction action)
 Enqueue a single action. More...
 

Properties

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

Detailed Description

Fiber implementation backed by a dedicated thread. IFiber

Constructor & Destructor Documentation

◆ ThreadFiber() [1/5]

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

Create a thread fiber with the default queue.

◆ ThreadFiber() [2/5]

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

Creates a thread fiber with a specified queue.

Parameters
queue

◆ ThreadFiber() [3/5]

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

Creates a thread fiber with a specified name.

///

Parameters
threadName

◆ ThreadFiber() [4/5]

ExitGames.Concurrency.Fibers.ThreadFiber.ThreadFiber ( IQueue  queue,
string  threadName 
)
inline

◆ ThreadFiber() [5/5]

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

◆ Dispose()

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

Stops the thread.

◆ Enqueue()

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

Enqueue a single action.

Parameters
action

Implements ExitGames.Concurrency.Core.IExecutionContext.

◆ Join()

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

◆ Schedule() [1/2]

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

IScheduler.Schedule(Action,int)

Parameters
action
firstInMs
Returns

Implements ExitGames.Concurrency.Core.IScheduler.

◆ Schedule() [2/2]

IDisposable ExitGames.Concurrency.Fibers.ThreadFiber.Schedule ( IFiberAction  action,
int  firstInMs 
)
inline

IScheduler.Schedule(IFiberAction,int)

Parameters
action
firstInMs
Returns

Implements ExitGames.Concurrency.Core.IScheduler.

◆ ScheduleOnInterval() [1/2]

IDisposable ExitGames.Concurrency.Fibers.ThreadFiber.ScheduleOnInterval ( Action  action,
int  firstInMs,
int  regularInMs 
)
inline

◆ ScheduleOnInterval() [2/2]

IDisposable ExitGames.Concurrency.Fibers.ThreadFiber.ScheduleOnInterval ( IFiberAction  action,
int  firstInMs,
int  regularInMs 
)
inline

Property Documentation

◆ NumSubscriptions

int ExitGames.Concurrency.Fibers.ThreadFiber.NumSubscriptions
get

◆ Thread

Thread ExitGames.Concurrency.Fibers.ThreadFiber.Thread
get