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: Add Pattern timeout support #1424

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

Conversation

He-Pin
Copy link
Member

@He-Pin He-Pin commented Aug 4, 2024

Motivation:
refs: #1359

still wip, test is missing

@pjfanning pjfanning added this to the 1.1.0-M2 milestone Aug 4, 2024
@He-Pin
Copy link
Member Author

He-Pin commented Aug 8, 2024

My wife just come to hangzhou, and I may don't have enough time to polish this , any feed back is welcome, I will try to get it done soon.

@pjfanning
Copy link
Contributor

Can this wait till 1.1.1 release?

@pjfanning pjfanning modified the milestones: 1.1.0, 1.1.1 Aug 23, 2024
val p = Promise[T]()
val timeout = using.scheduleOnce(duration) {
p.tryFailure(new TimeoutException(s"Timeout of $duration expired"))
if (future.isInstanceOf[CompletableFuture[T]]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool feature, but seem like it doesn't support scala future, because it haven't cancel/interrrupt method

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's true.

@pjfanning pjfanning modified the milestones: 1.1.1, 1.1.2 Sep 9, 2024
@Roiocam
Copy link
Member

Roiocam commented Sep 10, 2024

what is the plan for the shipping of this PR? it looks like it can be help to implement Hedged requests.

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.

3 participants