Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Timeouts #3522

alexandru started this conversation in General
Timeouts #3522
Apr 5, 2023 * 0 comments
Return to top
Discussion options

alexandru
Apr 5, 2023

Hi folks,

Not sure what medium is best for this discussion...

We are migrating a big codebase to CE 3, and I need a special timeout operation that gives up on cancelling the unending task (after a certain timeout). So, I'd like to timeout the cancelation, too. The current timeout implementations seem a little unintuitive, due to the desired propagation of cancelation.

The timeout operation I'm implementing is timing-out the cancelation because we have integrations with Java libraries that don't implement a reliable cancelation protocol. And the IO-driven logic should try to do the right thing.

This would be my draft, I'd appreciate a review -- I think it is correct, but given the nondeterministic nature of these races, there might be something I'm missing:

https://gist.github.com/alexandru/c7ddcc9e6fc67b12ae91c74c66056204

To me, an implementation of timeout like this makes a lot of sense, and I'd have this in Cats-Effect proper. Would like to know what you think of it.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
General
Labels
None yet
1 participant