Skip to content

Commit

Permalink
i#6831 sched refactor, step 1: Add pImpl idiom (#7074)
Browse files Browse the repository at this point in the history
This first step toward separating key scheduler code into separate
subclasses by mode of operation adds the pImpl idiom to the scheduler:
the scheduler_t implementation is moved to a private class
scheduler_impl_t, to let us (in a future step) create the appropriate
subclass without changing callers who construct a scheduler_t. This also
helps to split up and modularize the enormous scheduler class.

A future step will move the scheduler_impl_t code into a new file
scheduler_impl.cpp. That was separated out to make the diff easier to
read here.

The bulk of the changes involve:
+ The name change scheduler_tmpl_t to scheduler_impl_tmpl_t.
+ Having to qualify enum types as we do not have C++20's using enum.
+ Having to refer to types in another class now that the impl class is
separate from the outer class.
+ Moving inlined routines out of scheduler.h now that the implementation
is private and scheduler_impl_tmpl_t is an incomplete type in
scheduler.h.
+ Some sched_type_t qualifications are removed due to new (private)
using statements to make the code more readable.

Issue: #6831
  • Loading branch information
derekbruening authored Nov 12, 2024
1 parent 645ccbe commit 32782c1
Show file tree
Hide file tree
Showing 4 changed files with 1,681 additions and 1,385 deletions.
Loading

0 comments on commit 32782c1

Please sign in to comment.