Photon Server API
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 exeucted 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, long timeTilEnqueueInMs)
 Schedules an action on the Fiber. More...
 
IDisposable ScheduleActionOnInterval (Action action, long 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 exeucted in a serial manner.

Constructor & Destructor Documentation

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

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

Enqueues an action into the Fiber.

Parameters
actionThe action.
IDisposable Photon.SocketServer.Concurrency.ActionQueue.ScheduleAction ( Action  action,
long  timeTilEnqueueInMs 
)
inline

Schedules an action on the Fiber.

Parameters
actionThe action.
timeTilEnqueueInMsThe time til enqueue in ms.
Returns
a timer control
IDisposable Photon.SocketServer.Concurrency.ActionQueue.ScheduleActionOnInterval ( Action  action,
long  timeTilEnqueueInMs 
)
inline

Schedules an action on an interval.

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

Property Documentation

IFiber Photon.SocketServer.Concurrency.ActionQueue.Fiber
get

Gets the underlying IFiber.

object Photon.SocketServer.Concurrency.ActionQueue.Owner
get

Gets the action queue's owner.