Open ryanbogan opened 1 year ago
The ExtensionRunner / BaseExtension / Extension are all the same JVM and same threadpool.
If we already have it, it should be available for anyone to use.
I've been thinking about this in the context of the various places we will run Extensions. It makes sense to just have a thread pool object on the ExtensionsRunner
which will be accessible from extensions (via base extension setter as of #244).
ExtensionsRunner.run(new ExtensionOne()); ExtensionsRunner.run(ExtensionTwo());
and so on.runner1 = ExtensionsRunner.run(new ExtensionOne()); runner2 = ExtensionsRunner.run(new ExtensionTwo()); runner2.setThreadPool(runner1.getThreadPool());
Currently, threadPool is an instance variable in BaseExtension and is initialized within the SDK. This issue will determine whether to continue with the current practice or initialize it in the actual extension.