ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
Loading...
Searching...
No Matches
XmobiTea.Threading.RoundRobinFiber Class Reference

Represents a fiber that uses a round-robin scheduling strategy for task execution. More...

Inheritance diagram for XmobiTea.Threading.RoundRobinFiber:
XmobiTea.Threading.IFiber XmobiTea.Threading.IFiberControl XmobiTea.Threading.IFiberStatisticsCounter XmobiTea.Threading.IEnqueue XmobiTea.Threading.ISchedule XmobiTea.Threading.IScheduleOnInterval

Public Member Functions

 RoundRobinFiber (string name, int count)
 Initializes a new instance of the RoundRobinFiber class.
 
void Start ()
 Starts the fiber and adds it to the list of round-robin fibers.
 
IStatisticsCounter GetEnqueueCounter ()
 Gets the counter for tracking enqueued tasks.
 
IStatisticsCounter GetScheduleCounter ()
 Gets the counter for tracking scheduled tasks.
 
IStatisticsCounter GetScheduleOnIntervalCounter ()
 Gets the counter for tracking tasks scheduled on intervals.
 
ISingleTask Enqueue (Action action)
 Enqueues an action to be executed.
 
IScheduleTask Schedule (Action action, long firstInMs)
 Schedules an action to be executed after a specified delay.
 
IScheduleOnIntervalTask ScheduleOnInterval (Action action, long firstInMs, int regularInMs)
 Schedules an action to be executed at regular intervals.
 
void Dispose ()
 Disposes of the fiber, releasing any resources.
 
- Public Member Functions inherited from XmobiTea.Threading.IEnqueue
- Public Member Functions inherited from XmobiTea.Threading.ISchedule
- Public Member Functions inherited from XmobiTea.Threading.IScheduleOnInterval
- Public Member Functions inherited from XmobiTea.Threading.IFiberControl
- Public Member Functions inherited from XmobiTea.Threading.IFiberStatisticsCounter

Detailed Description

Represents a fiber that uses a round-robin scheduling strategy for task execution.

Constructor & Destructor Documentation

◆ RoundRobinFiber()

XmobiTea.Threading.RoundRobinFiber.RoundRobinFiber ( string name,
int count )

Initializes a new instance of the RoundRobinFiber class.

Parameters
nameThe name of the fiber.
countThe number of child threads to use.

Member Function Documentation

◆ Dispose()

void XmobiTea.Threading.RoundRobinFiber.Dispose ( )

Disposes of the fiber, releasing any resources.

Implements XmobiTea.Threading.IFiberControl.

◆ Enqueue()

ISingleTask XmobiTea.Threading.RoundRobinFiber.Enqueue ( Action action)

Enqueues an action to be executed.

Parameters
actionThe action to be enqueued.
Returns
An instance of ISingleTask representing the enqueued task.

Implements XmobiTea.Threading.IEnqueue.

◆ GetEnqueueCounter()

IStatisticsCounter XmobiTea.Threading.RoundRobinFiber.GetEnqueueCounter ( )

Gets the counter for tracking enqueued tasks.

Returns
An instance of IStatisticsCounter for enqueued tasks.

Implements XmobiTea.Threading.IFiberStatisticsCounter.

◆ GetScheduleCounter()

IStatisticsCounter XmobiTea.Threading.RoundRobinFiber.GetScheduleCounter ( )

Gets the counter for tracking scheduled tasks.

Returns
An instance of IStatisticsCounter for scheduled tasks.

Implements XmobiTea.Threading.IFiberStatisticsCounter.

◆ GetScheduleOnIntervalCounter()

IStatisticsCounter XmobiTea.Threading.RoundRobinFiber.GetScheduleOnIntervalCounter ( )

Gets the counter for tracking tasks scheduled on intervals.

Returns
An instance of IStatisticsCounter for interval scheduled tasks.

Implements XmobiTea.Threading.IFiberStatisticsCounter.

◆ Schedule()

IScheduleTask XmobiTea.Threading.RoundRobinFiber.Schedule ( Action action,
long firstInMs )

Schedules an action to be executed after a specified delay.

Parameters
actionThe action to be scheduled.
firstInMsThe delay in milliseconds before the action is executed.
Returns
An instance of IScheduleTask representing the scheduled task.

Implements XmobiTea.Threading.ISchedule.

◆ ScheduleOnInterval()

IScheduleOnIntervalTask XmobiTea.Threading.RoundRobinFiber.ScheduleOnInterval ( Action action,
long firstInMs,
int regularInMs )

Schedules an action to be executed at regular intervals.

Parameters
actionThe action to be scheduled.
firstInMsThe delay in milliseconds before the first execution of the action.
regularInMsThe interval in milliseconds between subsequent executions of the action.
Returns
An instance of IScheduleOnIntervalTask representing the scheduled task.

Implements XmobiTea.Threading.IScheduleOnInterval.

◆ Start()

void XmobiTea.Threading.RoundRobinFiber.Start ( )

Starts the fiber and adds it to the list of round-robin fibers.

Implements XmobiTea.Threading.IFiberControl.


The documentation for this class was generated from the following file: