feat: clarify call responses configurations #553
Draft
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.
Description
All inter-canister calls are inherently best-effort operations. The key distinction in the System API
ic0.call_with_best_effort_response
is how long to wait for a response: either unboundedly or with a specified timeout.By default,
Call
waits unboundedly for responses, as this is the only safe default behavior. In cases where bounded response time is safe (no significant cycles attached, no state change, idempotent endpoint, etc) developers can opt-in to timeout behavior using eitherwith_timeout()
for a default 10-second timeout orwith_timeout_secs(...)
for a custom timeout.How Has This Been Tested?
Existing e2e-tests : call.rs got updated.
Checklist: