jakartaee / concurrency

Eclipse Project for Concurrency Utilities
https://projects.eclipse.org/projects/ee4j.cu
Other
66 stars 38 forks source link

MaxConcurrency annotation #136

Open smillidge opened 3 years ago

smillidge commented 3 years ago

Annotation to define max concurrency for access to a method or bean. This was first mooted on the EJB spec but adding to concurrency would mean this could be used generally across the platform.

See https://github.com/javaee/ejb-spec/issues/9

Also see https://download.eclipse.org/microprofile/microprofile-fault-tolerance-2.1/apidocs/org/eclipse/microprofile/faulttolerance/Bulkhead.html

smillidge commented 2 years ago

If we have the new Async annotation I think we can have a very simple definition with just a single attribute for maxConcurrency and rely on Semaphore isolation. As the new Async annotation allows the developer to specify the specific ExecutorService which can be configured to have a maxAsync. Thread isolation can be acheived using the Async annotation and a ExecutorService with a configured maxAsync

edburns commented 9 months ago

Any word on getting this in for EE 11?

smillidge commented 9 months ago

it's tagged as a candidate for 3.1 which is the Jakarta EE 11 release. I don't think any work has been done yet though.