Better design for host-originating signals
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.7k
- Forks
- 144
- Avg merge
- 12h 21m
- Merged PRs (30d)
- 146
Description
I am quite surprised by this provider. There are some surprising inversions happening here, for example, it depends on
crate::shimin its signature.I don't think the
Signalsits well inshim, since theshimmodule is meant for traits that the shim must implement but there isn't a trait being implemented there.Also, "shim should call" implies that a shim that does not call stuff is incorrect. This sort of requirement is exactly what traits are for, and thus the way the design should be is to actually have the shim implement a trait that probably looks like the following:
pub trait ConsumeSignal { fn consume_signal(Signal); }Then the platform can always invoke this trait, and the shim can make a decision of it wants to buffer things or not. If you need/want the "all in a group" behavior, then you can make the trait (instead of the above):
pub trait ConsumeSignal { fn consume_signals(&[Signal]); }
Originally posted by @jaybosamiya-ms in https://github.com/microsoft/litebox/pull/690#discussion_r2874729698
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the discussion in PR #690 and inspect crate::shim and the Signal type to understand the current boundary. The issue names no files or tests; completion depends on resolving the proposed signal-consumption design and updating the affected implementation accordingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100