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

Carsten Ziegeler resolved SLING-2540.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: Commons Threads 3.2.0

Thanks for the patch, Timothee. I've applied it to the current trunk in a 
slightly modified way (logging).
I've not changed the eventing module as this one is built based on the old 
released version of the thread pool
                
> Allow the ThreadPool to process Callable/Runnable and return a Future
> ---------------------------------------------------------------------
>
>                 Key: SLING-2540
>                 URL: https://issues.apache.org/jira/browse/SLING-2540
>             Project: Sling
>          Issue Type: Improvement
>          Components: Commons
>    Affects Versions: Commons Threads 3.1.0
>            Reporter: Timothee Maret
>            Assignee: Carsten Ziegeler
>             Fix For: Commons Threads 3.2.0
>
>         Attachments: SLING-2540.patch
>
>
> Currently the sling's ThreadPool [0] is not returning a Future when executing 
> a task.
> However, having a handle on the future result of the computation is useful 
> for cases requiring fine grained synchronization among tasks.
> For instance, one could require to execute tasks mixing parallel and 
> sequential execution (Barrier synchronization). As an example, we could take 
> the following queue of tasks:
>     queue: -->(task1)-->(task2, task3, task4)-->(task5)-->(task6,task7)
>     Group of tasks = (task1, …, taskn)
>     Groups of tasks are executed sequentially
>     Tasks in a group are executed in parallel
> This could be easily implemented based on the Future objects returned by the 
> ThreadPool.
> Thus, it would be nice to enable it.
> [0] org.apache.sling.commons.threads.ThreadPool

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to