Installation Instructions
- Clone the repository:
git clone <repository-url>
- Navigate to the project directory:
cd XmobiTea.Threading
- Install dependencies using your preferred package manager.
Features
- Provides scheduling and queuing mechanisms using fiber-based threading.
- Supports single-task and interval-based task scheduling.
- Includes performance monitoring and statistics tracking.
Usage Examples
Creating and Starting a Fiber
var fiber = new RoundRobinFiber("FiberName", 4);
fiber.Start();
Enqueuing a Task
fiber.Enqueue(() => Console.WriteLine("Task executed"));
Scheduling a Task
fiber.Schedule(() => Console.WriteLine("Scheduled task executed"), 1000);
Scheduling a Task on Interval
fiber.ScheduleOnInterval(() => Console.WriteLine("Interval task executed"), 1000, 5000);
Supported Data Types
Action
for task definitions.
ISingleTask
, IScheduleTask
, IScheduleOnIntervalTask
for task interfaces.
Extensibility
- Implement custom task types by extending
SingleTask
or other task classes.
- Integrate with custom statistics counters by implementing
IStatisticsCounter
.
Contributing Guidelines
- Fork the repository and create a new branch for your changes.
- Ensure your code adheres to the project's coding standards.
- Submit a pull request with a detailed description of your changes.
License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
Acknowledgments
- Thanks to the contributors and community for their support and feedback.