Cancelling Java bindings' AsyncUtil.whileTrue
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 1.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 126
Description
There does not seem to be any downside to replacing `while (true)` in `LoopPartial.apply` with `while (!done.isDone())`.
This is by no means a comprehensive solution for code that composes futures. For example, it does not help `Database.runAsync`, where cancelling only causes the transaction not to be closed.
Contributor guide
Research direction
Start in the Java bindings at AsyncUtil.whileTrue, focusing on LoopPartial.apply and its use of while (true). Confirm that cancellation should stop the loop when done is complete, while noting that Database.runAsync is outside this proposed change. Done means the loop responds to cancellation without claiming to solve broader composed-future cleanup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100