Skip to content

ChangingThreadPoolingExplained

RoboFlax | Robin edited this page Mar 10, 2018 · 1 revision

Changing Thread-Pooling

By default the thread-pool which will be used for asynchronous is Executors.newFixedThreadPool( 100 ), but you can specify your own thread-pool when creating your CloudflareAccess instance.

ExecutorService threadPool = yourThreadPool(10);
cfAccess = new CloudflareAccess(CF_EMAIL, CF_API_KEY, threadPool);

Or use the default thread-pool and just change the maximum amount of parallel running threads.

cfAccess = new CloudflareAccess(CF_EMAIL, CF_API_KEY, 10);
Clone this wiki locally