-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(composer): interact with executor through handle (#834)
## Summary This is a minor refactor PR which moves the creation of the channel through which executor receives SequenceActions to submit to the Shared Sequence N/w to the executor. ## Background Previously, the channels were created by the Composer which creates the Executor. It is better practice to allow the Executor to create the channel which it owns and just return the sending end of it back to the Composer. ## Changes - Create a struct `Handle` in Executor which is referenced as `executor::Handle`. - Handle creation of the `executor::Handle` in Executor and allow Executor to pass it back. ## Testing Since this is not a functional PR change, making sure that the code compiles and the tests run is enough to ensure that this works. ## Note The tests were initially using just `send` on the channel but the executor uses `send_with_timeout`. We could add just a `send` method to the `executor::Handle`. But to avoid clippy errors w.r.t unused method `send` and avoiding a `#[cfg(test)]` in the method, I updated the tests to use `send_with_timeout` instead of `send`. closes <!-- list any issues closed here -->
- Loading branch information
1 parent
f3d2c18
commit 87c49dc
Showing
8 changed files
with
116 additions
and
163 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
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
Oops, something went wrong.