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

Queue with bounded capacity. Will throw exception if capacity does not recede prior to wait time. More...

Inheritance diagram for ExitGames.Concurrency.Core.BoundedQueue:
ExitGames.Concurrency.Core.IQueue

Public Member Functions

 BoundedQueue (IExecutor executor)
 
 BoundedQueue ()
 
void Enqueue (Action action)
 Enqueue action. More...
 
void Run ()
 Execute actions until stopped. More...
 
void Stop ()
 Stop consuming actions. More...
 
bool ExecuteNextBatch ()
 Remove all actions and execute. More...
 

Properties

int MaxDepth [get, set]
 Max number of actions to be queued. More...
 
int MaxEnqueueWaitTime [get, set]
 Max time to wait for space in the queue. More...
 

Detailed Description

Queue with bounded capacity. Will throw exception if capacity does not recede prior to wait time.

Constructor & Destructor Documentation

ExitGames.Concurrency.Core.BoundedQueue.BoundedQueue ( IExecutor  executor)
inline

summary> Creates a bounded queue with the default executor. /summary>

ExitGames.Concurrency.Core.BoundedQueue.BoundedQueue ( )
inline

Member Function Documentation

void ExitGames.Concurrency.Core.BoundedQueue.Enqueue ( Action  action)
inline

Enqueue action.

Parameters
action

Implements ExitGames.Concurrency.Core.IQueue.

bool ExitGames.Concurrency.Core.BoundedQueue.ExecuteNextBatch ( )
inline

Remove all actions and execute.

Returns
void ExitGames.Concurrency.Core.BoundedQueue.Run ( )
inline

Execute actions until stopped.

Implements ExitGames.Concurrency.Core.IQueue.

void ExitGames.Concurrency.Core.BoundedQueue.Stop ( )
inline

Stop consuming actions.

Implements ExitGames.Concurrency.Core.IQueue.

Property Documentation

int ExitGames.Concurrency.Core.BoundedQueue.MaxDepth
getset

Max number of actions to be queued.

int ExitGames.Concurrency.Core.BoundedQueue.MaxEnqueueWaitTime
getset

Max time to wait for space in the queue.