What is happening to all not finished tasks (threads) after joinUntil throws TimeoutException
Sergii Chekotylo
sergii.chekotylo at gmail.com
Sat Apr 5 00:18:12 UTC 2025
The idea is to have a limited time for multiple tasks to finish.
But if any of them didn’t finish - how to make sure that all of not-finished are interrupted and not using resources.
Example:
For one incoming http request I need to make 100 external calls to other systems to prepare data.
And I need to have my own SLA no matter what is happening with other endpoints.
If I’ll put joinUntill(“3s”) and my external calls are longer than that I should get TimeOutException.
Which I can process in some way and give a result back.
But what will happen to all unfinished tasks? Are they going to be interrupted or they will run till something else happened in each of them?
Thanks,
Sergii
More information about the loom-dev
mailing list