Repository navigation
Conversation
Two small defects in the execute-then-poll helpers. The blocking poll_update_until_complete had no delay in its loop, so it re-issued GetUpdate as fast as the network allowed for the entire duration of the execution. The async variant already sleeps 500ms; this matches it. The execute doc comment pointed readers at [execute_and_poll_until_complete], which does not exist. The function is execute_and_poll.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small defects in the execute-then-poll helpers.
1. The blocking poll helper busy-loops
poll_update_until_completeunder#[cfg(feature = "blocking")]has no delay in its loop, so it re-issuesGetUpdateas fast as the network allows for the whole execution. For a Stack deploy that is minutes of hot looping against Core. The async variant already sleeps 500 ms between polls; this adds the matchingstd::thread::sleep.2. A doc comment points at a function that does not exist
client/core/ts/src/lib.ts, onexecute, says to use[execute_and_poll_until_complete]to block until the task finishes. The exported function isexecute_and_poll.Verification
cargo check -p komodo_client --features blockingclean (it also clears theunused import: Durationwarning the cfg'd-out variant left),cargo fmt --checkclean.