File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ pub mod Scheduler;
1212pub mod Task ;
1313
1414// --- Internal Implementation ---
15- mod Queue ;
15+ pub mod Queue ;
Original file line number Diff line number Diff line change 66
77#![ allow( non_snake_case, non_camel_case_types) ]
88
9- mod StealingQueue ;
9+ pub mod StealingQueue ;
1010
1111// Re-exports the `StealingQueue` for use within the `Echo` crate, but keeps it
1212// private from external consumers.
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ impl SchedulerBuilder {
3333 /// By default, the worker count is set to the number of logical CPUs on the
3434 /// system, with a minimum of 2.
3535 pub fn New ( ) -> Self {
36- let DefaultWorkerCount = num_cpus:: get ( ) . max ( 2 ) ;
36+ let DefaultWorkerCount = num_cpus:: get ( ) . max ( 2 ) . expect ( "" ) ;
3737 Self { WorkerCount : DefaultWorkerCount , QueueConfiguration : HashMap :: new ( ) }
3838 }
3939
@@ -45,7 +45,7 @@ impl SchedulerBuilder {
4545 pub fn WithWorkerCount ( mut self , WorkerCount : usize ) -> Self {
4646 if WorkerCount == 0 {
4747 warn ! ( "[SchedulerBuilder] Worker count of 0 is invalid. Defaulting to number of logical CPUs." ) ;
48- self . WorkerCount = num_cpus:: get ( ) . max ( 2 ) ;
48+ self . WorkerCount = num_cpus:: get ( ) . max ( 2 ) . expect ( "" ) ;
4949 } else {
5050 self . WorkerCount = WorkerCount ;
5151 }
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ use tokio::time::{Duration, sleep};
1010/// @description Defines the `Worker` struct, which represents a single
1111/// execution thread in the scheduler's pool. This is an internal component of
1212/// the scheduler.
13- use crate :: queue :: StealingQueue ;
13+ use crate :: Queue :: StealingQueue ;
1414
1515/// Represents a single worker thread that continuously polls the work-stealing
1616/// queue for tasks to execute.
Original file line number Diff line number Diff line change 66#![ allow( non_snake_case, non_camel_case_types) ]
77
88// --- Sub-modules ---
9- mod Priority ;
10- mod Task ;
9+ pub mod Priority ;
10+ pub mod Task ;
1111
1212// --- Public Re-exports ---
1313
1414// The enum representing the priority of a task.
1515// @see Priority
1616//
17- pub use self :: Priority :: Priority ;
17+ // pub use self::Priority::Priority;
1818// The struct representing a single unit of work for the scheduler.
1919// @see Task
20- pub use self :: Task :: Task ;
20+ // pub use self::Task::Task;
You can’t perform that action at this time.
0 commit comments