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

feat: clarify call responses configurations #553

Draft
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

lwshang
Copy link
Contributor

@lwshang lwshang commented Jan 30, 2025

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 either with_timeout() for a default 10-second timeout or with_timeout_secs(...) for a custom timeout.

How Has This Been Tested?

Existing e2e-tests : call.rs got updated.

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@lwshang lwshang changed the title feat: clarify call responses feat: clarify call responses configurations Jan 30, 2025
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

Successfully merging this pull request may close these issues.

1 participant