[ 
https://issues.apache.org/jira/browse/CAMEL-26478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-26478.
---------------------------------
    Resolution: Fixed

Fixed by https://github.com/apache/camel/pull/28823, merged to main as 
de836f4af365f97c310751b54fa381f48190e9c4.

_Claude Code on behalf of davsclaus_

> camel-util - BoundedExecutorService: a task must not wait for a permit it 
> holds itself
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26478
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26478
>             Project: Camel
>          Issue Type: Sub-task
>            Reporter: Adriano Machado
>            Assignee: Adriano Machado
>            Priority: Major
>             Fix For: 4.24.0
>
>
> Found in CAMEL-25132. With virtual threads, a task running in a 
> BoundedExecutorService that submits more work waits for a permit, and with a 
> low maxQueueSize it can hold the only permit itself. A parallel split does 
> this, as its parent task runs in the executor and submits its items to it.
> With maxQueueSize 1 and the CallerRuns policy, each wait lasts until 
> keepAliveTime expires. Measured with 4 items: 7 seconds with a keepAliveTime 
> of 1 second, so about 7 minutes with the default of 60 seconds. With a split 
> timeout the unfinished items are dropped with no exception, so messages are 
> lost. With the Block policy the wait has no timeout. Platform threads do not 
> stall, as the caller runs the task at once.
> A task in the executor should run the work itself when no permit is free, 
> unless the policy is Abort. A submitter outside the executor waits as before.
> _Claude Code on behalf of Adriano Machado (@ammachado)_
> _This was generated by an AI agent and may contain inaccuracies. Please 
> verify before relying on it._



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to