Photon Server API Documentation v5.0RC1

Public Member Functions | Properties | List of all members
Photon.SocketServer.Concurrency.ActionQueue Class Reference

This class is an IFiber wrapper. It ensures that async actions are executed in a serial manner. More...

Public Member Functions

 ActionQueue (object owner, IFiber fiber)
 Initializes a new instance of the ActionQueue class. More...
 
void EnqueueAction (Action action)
 Enqueues an action into the Fiber. More...
 
IDisposable ScheduleAction (Action action, int timeTilEnqueueInMs)
 Schedules an action on the Fiber. More...
 
IDisposable ScheduleActionOnInterval (Action action, int timeTilEnqueueInMs)
 Schedules an action on an interval. More...
 

Properties

IFiber Fiber [get]
 Gets the underlying IFiber. More...
 
object Owner [get]
 Gets the action queue's owner. More...
 

Detailed Description

This class is an IFiber wrapper. It ensures that async actions are executed in a serial manner.

Constructor & Destructor Documentation

◆ ActionQueue()

Photon.SocketServer.Concurrency.ActionQueue.ActionQueue ( object  owner,
IFiber  fiber 
)
inline

Initializes a new instance of the ActionQueue class.

Parameters
ownerThe owner.
fiberThe fiber.

Member Function Documentation

◆ EnqueueAction()

void Photon.SocketServer.Concurrency.ActionQueue.EnqueueAction ( Action  action)
inline

Enqueues an action into the Fiber.

Parameters
actionThe action.

◆ ScheduleAction()

IDisposable Photon.SocketServer.Concurrency.ActionQueue.ScheduleAction ( Action  action,
int  timeTilEnqueueInMs 
)
inline

Schedules an action on the Fiber.

Parameters
actionThe action.
timeTilEnqueueInMsThe time til enqueue in ms.
Returns
a timer control

◆ ScheduleActionOnInterval()

IDisposable Photon.SocketServer.Concurrency.ActionQueue.ScheduleActionOnInterval ( Action  action,
int  timeTilEnqueueInMs 
)
inline

Schedules an action on an interval.

Parameters
actionThe action.
timeTilEnqueueInMsThe time til enqueue in ms.
Returns
a timer control

Property Documentation

◆ Fiber

IFiber Photon.SocketServer.Concurrency.ActionQueue.Fiber
get

Gets the underlying IFiber.

◆ Owner

object Photon.SocketServer.Concurrency.ActionQueue.Owner
get

Gets the action queue's owner.