Skip to content

Conversation

cbuttner
Copy link
Contributor

No description provided.

@cbuttner
Copy link
Contributor Author

I should mention wait_for overlaps with wait_timeout, so maybe wait_timeout could be deprecated.

@lerno
Copy link
Collaborator

lerno commented Jul 15, 2025

What about wait_duration rather than wait_for

@cbuttner
Copy link
Contributor Author

Actually I think wait_timeout is a good name, because it doesn't imply that it guarantees to block for the full duration (it might not due to spurious wakeups).
But how should it take a Duration instead of ms without it being a breaking change?

@lerno
Copy link
Collaborator

lerno commented Jul 16, 2025

Well, you can be tricky and use macros for it. But there's a problem with Duration / NanoDuration and just ms because of how they're converted from literals. So for now you need to assume passing "1" means ms and not Duration. But this is a bigger problem, where I wonder if typedefs should be able to opt out of implicit literal conversion.

@lerno lerno merged commit 2053f27 into c3lang:master Jul 19, 2025
41 checks passed
@lerno
Copy link
Collaborator

lerno commented Jul 19, 2025

I modified so that timeout worked for either, allowing us to deprecate ms later.

@lerno
Copy link
Collaborator

lerno commented Jul 19, 2025

Thank you!

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.

2 participants