-
Notifications
You must be signed in to change notification settings - Fork 39
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
Ensure handle_demand busy wait infinite loop doesn't occur & deprecate message_child #779
Conversation
…mands loop message at the time
3146155
to
150069c
Compare
|
||
pipeline = Testing.Pipeline.start_link_supervised!(spec: spec) | ||
|
||
Process.sleep(1_000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can assert_start_of_stream on each sink instead
|
||
Process.sleep(1_000) | ||
|
||
for _i <- 1..(auto_demand_size + 5) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To ensure, that this line
DemandHandler.handle_redemand(pad_data.ref, state) |
will be executed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I think, that it would be good to have auto_demand_size < delayed_demand_loop_counter_limit, to ensure, that counter won't reset after reaching linked code. I will change this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so let’s change the naming or add a comment indicating it’s to exceed the loop counter limit
8769ebf
to
bd5f8f3
Compare
# auto_demand_size is smaller than delayed_demands_loop_counter_limit to ensure, that counter | ||
# doesn't reset after calling handle_demand caused by reading positive atomic demand value | ||
# during the snaphsot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# auto_demand_size is smaller than delayed_demands_loop_counter_limit to ensure, that counter | |
# doesn't reset after calling handle_demand caused by reading positive atomic demand value | |
# during the snaphsot | |
# auto_demand_size is smaller than delayed_demands_loop_counter_limit, to ensure that | |
# after calling handle_demand and making a snapshot, the atomic demand value is still positive | |
# and the counter is not reset |
Prerequisite for #769
Related to #706