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

WaitSet adjustments #507

Closed
elfenpiff opened this issue Nov 8, 2024 · 1 comment · Fixed by #509
Closed

WaitSet adjustments #507

elfenpiff opened this issue Nov 8, 2024 · 1 comment · Fixed by #509
Assignees
Labels
enhancement New feature or request

Comments

@elfenpiff
Copy link
Contributor

elfenpiff commented Nov 8, 2024

(Code) Example Of Cumbersome API

When WaitSet::stop was called, the WaitSet becomes unusable. The original intention was to interrupt the callback, not the WaitSet usage completely.

  • The user would like to interrupt the wait_and_process call after a specific event
    • It shall be possible to recall it again and continue
    • All unhandled events will be lost

Improvement Suggestion

  • Remove WaitSet::stop() and use the existing CallbackProgression approach for callbacks, see: WaitSet::wait_and_process<F: FnMut(WaitSetAttachmentId<Service>) /* NEW*/ -> CallbackProgression>
  • introduce WaitSet::blocking_wait_and_process_once() it blocking waits until 1..N events arrived, calls the callback for every event and then returns back to the user in contrast to WaitSet::wait_and_process() that keeps going.
  • WaitSet::try_wait_and_process() actually blocks for timers, this needs to be refactored so that it is non-blocking
  • rename WaitSet::wait_and_process into WaitSet::blocking_wait_and_process.
@elfenpiff elfenpiff added the enhancement New feature or request label Nov 8, 2024
@elfenpiff
Copy link
Contributor Author

@orecham I think when this is implemented WaitSet::blocking_wait_and_process_once() would be exactly what you need.

@elfenpiff elfenpiff self-assigned this Nov 8, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 9, 2024
…rocess calls; rename try_wait_and_process into wait_and_process_once
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 9, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 9, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 9, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 9, 2024
@elfenpiff elfenpiff mentioned this issue Nov 9, 2024
17 tasks
elfenpiff added a commit that referenced this issue Nov 12, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 12, 2024
…rocess calls; rename try_wait_and_process into wait_and_process_once
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 12, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 12, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 12, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 12, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 13, 2024
…rocess calls; rename try_wait_and_process into wait_and_process_once
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 13, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 13, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 13, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 13, 2024
orecham pushed a commit to orecham/iceoryx2 that referenced this issue Nov 13, 2024
…rocess calls; rename try_wait_and_process into wait_and_process_once
orecham pushed a commit to orecham/iceoryx2 that referenced this issue Nov 13, 2024
orecham pushed a commit to orecham/iceoryx2 that referenced this issue Nov 13, 2024
orecham pushed a commit to orecham/iceoryx2 that referenced this issue Nov 13, 2024
orecham pushed a commit to orecham/iceoryx2 that referenced this issue Nov 13, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 18, 2024
…rocess calls; rename try_wait_and_process into wait_and_process_once
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 18, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 18, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 18, 2024
elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Nov 18, 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
None yet
Development

Successfully merging a pull request may close this issue.

1 participant