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

Multiple timeout values #1105

Open
shirok opened this issue Jan 21, 2025 · 0 comments
Open

Multiple timeout values #1105

shirok opened this issue Jan 21, 2025 · 0 comments

Comments

@shirok
Copy link
Owner

shirok commented Jan 21, 2025

We have APIs that takes timeout and timeout-val, e.g. future-get and with-timeout. They allow main expression to return MVs, so it is natural that it can also return MVs for the timeout-val. How shall we let the caller specify that?

  • We can use rest arguments as timeout-vals, e.g. (future-get expr timeout val-a val-b val-c). This is backward-compatible. Prevents future extension of futher optional arguments.
  • Add a new API that allows multiple timeout-vals, e.g. a thunk that's called when timeout occurs. (future-get/timeout-thunk expr timeout (lambda () (values val-a val-b val-c))). The name is debatable.

(Stemmed from #1103 (comment) )

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

1 participant