Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ› οΈ [TASK] : Hermes Event completness notification #256

Closed
Tracked by #203
Mr-Leshiy opened this issue Jun 17, 2024 · 2 comments
Closed
Tracked by #203

πŸ› οΈ [TASK] : Hermes Event completness notification #256

Mr-Leshiy opened this issue Jun 17, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Mr-Leshiy
Copy link
Contributor

Mr-Leshiy commented Jun 17, 2024

Summary

Implement a mechanism which will allow, for a producer of the Hermes event, to know whether this event was already executed or not.
So the event producer's could look like:

let event = SomeEvent::new();
let event_waiter = event.get_waiter();
event::queue::send(event); 
event_waiter.wait();

Description

Potential implementation

  1. Every Event can have an OPTIONAL mpsc queue of depth n attached to it.
  2. The Extension generating the event, if it wants notice that the event is fully processed, creates the mpsc queue, and attaches it to the event.
  3. The Sender then waits on the queue.
  4. The Event queue, dispatches the event, and when the event is fully processed, before its discarded, the event queue posts the event back to the mpsc queue in the event itself (assuming one is defined).
@stevenj
Copy link
Collaborator

stevenj commented Jun 17, 2024

We want the three added functions:

make_waiter() -> Returns the RX handle, sets internally Some(tx_handle).
set_waiter(tx) -> Sets Some(tx_handle) if the mpsc was already created outside.
finished() -> if tx_handle.is_not_none() tx_handle.send(self)

@stevenj stevenj moved this from New to πŸ”– Ready in Catalyst Jun 17, 2024
@cong-or cong-or moved this from πŸ”– Ready to πŸ— In progress in Catalyst Jun 18, 2024
@cong-or cong-or moved this from πŸ— In progress to πŸ‘€ In review in Catalyst Jul 3, 2024
@cong-or cong-or moved this from πŸ‘€ In review to βœ… Done in Catalyst Jul 5, 2024
@stevenj stevenj closed this as completed Aug 9, 2024
@github-project-automation github-project-automation bot moved this from βœ… Done to πŸ”¬ Ready For QA in Catalyst Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

3 participants