# ElasticSearch Plugins with its own thread pool

**URL:** <https://discuss.elastic.co/t/elasticsearch-plugins-with-its-own-thread-pool/362826>\
**Category:** Elasticsearch\
**Created:** [July 9, 2024, 10:58pm UTC](https://discuss.elastic.co/t/elasticsearch-plugins-with-its-own-thread-pool/362826 "2024-07-09T22:58:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ktech007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ktech007/32/124751_2.png) [@ktech007](https://discuss.elastic.co/u/ktech007)\
**Post date:** [July 9, 2024, 10:58pm UTC](https://discuss.elastic.co/t/elasticsearch-plugins-with-its-own-thread-pool/362826/1 "2024-07-09T22:58:53Z")

</div>

In a custom script plugin, is it possible to have its thread pool for some concurrency? For example: in [this execute method](https://github.com/elastic/elasticsearch/blob/5d6e6c12cacc02abebba95b69236784ced2d3b03/plugins/examples/script-expert-scoring/src/main/java/org/elasticsearch/example/expertscript/ExpertScriptPlugin.java#L168-L182), can I do some concurrency using a thread pool?

What I understand is that the script plugin will get called in some search threadpool, but can I have another one inside the plugin for more concurrency? I see this method getExecutorBuilders, but not able to understand how it is used.
