![]() |
ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
|
Represents a fiber that uses a round-robin scheduling strategy for task execution. More...
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. | |
![]() | |
![]() | |
![]() | |
![]() | |
![]() |
Represents a fiber that uses a round-robin scheduling strategy for task execution.
XmobiTea.Threading.RoundRobinFiber.RoundRobinFiber | ( | string | name, |
int | count ) |
Initializes a new instance of the RoundRobinFiber class.
name | The name of the fiber. |
count | The number of child threads to use. |
void XmobiTea.Threading.RoundRobinFiber.Dispose | ( | ) |
Disposes of the fiber, releasing any resources.
Implements XmobiTea.Threading.IFiberControl.
ISingleTask XmobiTea.Threading.RoundRobinFiber.Enqueue | ( | Action | action | ) |
Enqueues an action to be executed.
action | The action to be enqueued. |
Implements XmobiTea.Threading.IEnqueue.
IStatisticsCounter XmobiTea.Threading.RoundRobinFiber.GetEnqueueCounter | ( | ) |
Gets the counter for tracking enqueued tasks.
Implements XmobiTea.Threading.IFiberStatisticsCounter.
IStatisticsCounter XmobiTea.Threading.RoundRobinFiber.GetScheduleCounter | ( | ) |
Gets the counter for tracking scheduled tasks.
Implements XmobiTea.Threading.IFiberStatisticsCounter.
IStatisticsCounter XmobiTea.Threading.RoundRobinFiber.GetScheduleOnIntervalCounter | ( | ) |
Gets the counter for tracking tasks scheduled on intervals.
Implements XmobiTea.Threading.IFiberStatisticsCounter.
IScheduleTask XmobiTea.Threading.RoundRobinFiber.Schedule | ( | Action | action, |
long | firstInMs ) |
Schedules an action to be executed after a specified delay.
action | The action to be scheduled. |
firstInMs | The delay in milliseconds before the action is executed. |
Implements XmobiTea.Threading.ISchedule.
IScheduleOnIntervalTask XmobiTea.Threading.RoundRobinFiber.ScheduleOnInterval | ( | Action | action, |
long | firstInMs, | ||
int | regularInMs ) |
Schedules an action to be executed at regular intervals.
action | The action to be scheduled. |
firstInMs | The delay in milliseconds before the first execution of the action. |
regularInMs | The interval in milliseconds between subsequent executions of the action. |
Implements XmobiTea.Threading.IScheduleOnInterval.
void XmobiTea.Threading.RoundRobinFiber.Start | ( | ) |
Starts the fiber and adds it to the list of round-robin fibers.
Implements XmobiTea.Threading.IFiberControl.