-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rt: extract
basic_scheduler::Config
(#4935)
- Loading branch information
1 parent
d720770
commit df28ac0
Showing
6 changed files
with
45 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use crate::runtime::Callback; | ||
|
||
pub(crate) struct Config { | ||
/// How many ticks before pulling a task from the global/remote queue? | ||
pub(crate) global_queue_interval: u32, | ||
|
||
/// How many ticks before yielding to the driver for timer and I/O events? | ||
pub(crate) event_interval: u32, | ||
|
||
/// Callback for a worker parking itself | ||
pub(crate) before_park: Option<Callback>, | ||
|
||
/// Callback for a worker unparking itself | ||
pub(crate) after_unpark: Option<Callback>, | ||
|
||
#[cfg(tokio_unstable)] | ||
/// How to respond to unhandled task panics. | ||
pub(crate) unhandled_panic: crate::runtime::UnhandledPanic, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters