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

Configurable pre_post_proc #11

Closed
swarth100 opened this issue Apr 4, 2019 · 1 comment
Closed

Configurable pre_post_proc #11

swarth100 opened this issue Apr 4, 2019 · 1 comment

Comments

@swarth100
Copy link

swarth100 commented Apr 4, 2019

Currently the pre_post_proc struct gets configured on gmw_start and is constant throughout the whole protocol execution.

This means that at the end of each Baloo round we are forced to poll to execute the post_process_current_round and the post_process_current_round should they be defined.

    /* poll the post process */
    if(pre_post_proc.post_process_current_round) {
      process_poll(pre_post_proc.post_process_current_round);
    }

    /* wake-up earlier to execute the pre-process (if one is defined) */
    pre_process_offset = (!pre_post_proc.pre_process_next_round) ? 0 :
                         GMW_MS_TO_TICKS(GMW_CONF_T_PREPROCESS);

I was wondering if an extension to this is either planned by you guys, or a modification by PR is welcome.

The idea would be to either

  1. Add a configurable flag section to the struct gmw_pre_post_processes which can allow to toggle the pre and post polls on or off.
  2. Allow full configuration of the struct gmw_pre_post_processes, exposing methods to change its contents after the initial gmw_start call. This would allow to set the post_process_current_round field to NULL temporarily should be wish to not preempt.

Is it reasonable? The idea that certain protocols might wish to have back-to-back floods without being forced to preempt the app process before they are finished.

@romain-jacob
Copy link
Collaborator

Allow full configuration of the struct gmw_pre_post_processes, exposing methods to change its contents after the initial gmw_start call. This would allow to set the post_process_current_round field to NULL temporarily should be wish to not preempt.

This is already implemented. It can be controlled via the on_round_finished() callback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants