[wildfly-dev] Proposal of an additional JBossThreadPoolExecutor (WFLY-5332)

Panagiotis Sotiropoulos psotirop at redhat.com
Fri Sep 25 10:20:19 EDT 2015


Hello David,

I have added a diagram that describes the states of the basic variables of the Modified JBoss Thread Pool Executor.
As far as concurrency safety is concerned, the key point is this:
Line #1179 of https://github.com/jbossas/jboss-threads/pull/17/files ...
If there are no idle threads then new threads will be created, which is ok.
If there are few idle threads and we receive a lot of concurrent requests then all these requests will consider that there is at least one idle thread, but again no problem as the will be en queued to the work queue and go on from there.

Regards,
Panagiotis

----- Original Message -----
From: "Panagiotis Sotiropoulos" <psotirop at redhat.com>
To: "David M. Lloyd" <david.lloyd at redhat.com>
Cc: wildfly-dev at lists.jboss.org
Sent: Thursday, September 24, 2015 5:12:01 PM
Subject: Re: [wildfly-dev] Proposal of an additional JBossThreadPoolExecutor (WFLY-5332)

Hello David,

I will try to create state diagrams that show the states of the data structures in various concurrency cases.

Regards,
Panagiotis

----- Original Message -----
From: "David M. Lloyd" <david.lloyd at redhat.com>
To: wildfly-dev at lists.jboss.org
Sent: Thursday, September 24, 2015 4:48:18 PM
Subject: Re: [wildfly-dev] Proposal of an additional JBossThreadPoolExecutor (WFLY-5332)

Thanks for the effort to do this.  However it is necessary to point out 
that while you have made a very descriptive flowchart of the logic of 
the thread pool, it is unfortunately not actually a state diagram; it 
does not describe the state of the various data structures, and their 
response to external (possibly asynchronous) stimuli, which is what is 
necessary to ascertain the correctness of a concurrent algorithm such as 
the one at the core of a thread pool.

On 09/24/2015 09:41 AM, Panagiotis Sotiropoulos wrote:
> Hello all,
>
> Because of WFLY-5332, I have modified the JBossThreadPoolExecutor in order to allow the configuration of max-threads and core-threads independently, while preventing the addition of a thread if an idle thread already exists.
> I have attached the state diagrams of the two executors on https://issues.jboss.org/browse/WFLY-5332.
>
> Regards,
> Panagiotis Sotiropoulos
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>

-- 
- DML
_______________________________________________
wildfly-dev mailing list
wildfly-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/wildfly-dev
_______________________________________________
wildfly-dev mailing list
wildfly-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/wildfly-dev


More information about the wildfly-dev mailing list