This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce primitive threading in unified scheduler (#34676)
* Introduce primitive threading in unified scheduler * Make the internal struct ExecutedTask not pub * Improve wording a bit * Explain scheduler main loop's overhead sensitivity * Improve wording a bit * Define ChainedChannel{Sender, Receiver} wrappers * Clean up a bit * Use derivative to avoid manual Clone impl * Clarify comment * Remove extra whitespace in comment * Remove unneeded dyn trait for ChainedChannel * Remove the accumulator thread for now * Fix typo * Use unimplemented!() to convey intention better
- Loading branch information
Showing
7 changed files
with
535 additions
and
60 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1,20 @@ | ||
// This file will be populated with actual implementation later. | ||
use solana_sdk::transaction::SanitizedTransaction; | ||
|
||
pub struct Task { | ||
transaction: SanitizedTransaction, | ||
index: usize, | ||
} | ||
|
||
impl Task { | ||
pub fn create_task(transaction: SanitizedTransaction, index: usize) -> Self { | ||
Task { transaction, index } | ||
} | ||
|
||
pub fn task_index(&self) -> usize { | ||
self.index | ||
} | ||
|
||
pub fn transaction(&self) -> &SanitizedTransaction { | ||
&self.transaction | ||
} | ||
} |
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
Oops, something went wrong.