![]() |
ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
|
Represents a fiber that uses a dedicated thread for task execution and scheduling. More...
Public Member Functions | |
ThreadFiber (string name) | |
Initializes a new instance of the ThreadFiber class. | |
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 | Start () |
Starts the thread for processing tasks. | |
void | Dispose () |
Disposes of the fiber, releasing any resources. | |
![]() | |
![]() | |
![]() | |
![]() | |
![]() |
Represents a fiber that uses a dedicated thread for task execution and scheduling.
XmobiTea.Threading.ThreadFiber.ThreadFiber | ( | string | name | ) |
Initializes a new instance of the ThreadFiber class.
name | The name of the thread. |
void XmobiTea.Threading.ThreadFiber.Dispose | ( | ) |
Disposes of the fiber, releasing any resources.
Implements XmobiTea.Threading.IFiberControl.
ISingleTask XmobiTea.Threading.ThreadFiber.Enqueue | ( | Action | action | ) |
Enqueues an action to be executed.
action | The action to be enqueued. |
Implements XmobiTea.Threading.IEnqueue.
IStatisticsCounter XmobiTea.Threading.ThreadFiber.GetEnqueueCounter | ( | ) |
Gets the counter for tracking enqueued tasks.
Implements XmobiTea.Threading.IFiberStatisticsCounter.
IStatisticsCounter XmobiTea.Threading.ThreadFiber.GetScheduleCounter | ( | ) |
Gets the counter for tracking scheduled tasks.
Implements XmobiTea.Threading.IFiberStatisticsCounter.
IStatisticsCounter XmobiTea.Threading.ThreadFiber.GetScheduleOnIntervalCounter | ( | ) |
Gets the counter for tracking tasks scheduled on intervals.
Implements XmobiTea.Threading.IFiberStatisticsCounter.
IScheduleTask XmobiTea.Threading.ThreadFiber.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.ThreadFiber.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.ThreadFiber.Start | ( | ) |
Starts the thread for processing tasks.
Implements XmobiTea.Threading.IFiberControl.