Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Scheduler #46

Merged
merged 10 commits into from
Aug 20, 2023

Conversation

zefir-git
Copy link
Member

@zefir-git zefir-git commented Aug 19, 2023

Implements scheduling.

The scheduler is a class that when instantiated has a clock ticking at a certain frequency. The scheduler has an age which indicates the number of times it has ticked. The scheduler has a queue of tasks. Each task specifies a desired target age of the scheduler when that task is to be run. The task includes code that is executed.

Tasks can be cancelled. You can also create a repeating task if you wish to run the same code multiple times at fixed intervals.

A public server scheduler with frequency 20Hz (20 TPS) is instantiated at Server#scheduler. The scheduler begins ticking as soon as the server is started.

@zefir-git zefir-git added the enhancement New feature or request label Aug 19, 2023
@zefir-git zefir-git self-assigned this Aug 19, 2023
@zefir-git zefir-git linked an issue Aug 19, 2023 that may be closed by this pull request
@zefir-git zefir-git removed the request for review from kai-gitt August 19, 2023 16:19
@zefir-git zefir-git marked this pull request as ready for review August 20, 2023 14:14
Copy link
Member

@kai-gitt kai-gitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@zefir-git zefir-git merged commit a9f5d00 into main Aug 20, 2023
4 checks passed
@zefir-git zefir-git deleted the 44-feature-server-scheduler-with-clock-at-20-hz-tps branch August 20, 2023 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Server scheduler with clock at 20 Hz (TPS)
2 participants