commercetools / commercetools/commercetools-sdk-java-v2

Add way to specify executorservice to be used when returning commercetools SDK result

Open
#332 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
47
Forks
21
Avg merge
9d 13h
Merged PRs (30d)
4

Description

**Is your feature request related to a problem? Please describe.**
Modern async Java applications need control on which Threadpool which tasks are running.
Currently, by default, all responses returning from commercetools SDK will continue running in a thread managed by a threadpool from the SDK.

**Describe the solution you'd like**
Add a way (potentially via Middleware?) to automatically return from any call to commercetools SDK running on a thread from a configurable threadpool AKA Executor

**Describe alternatives you've considered**
Alternatively, we could manually do:

`
ctApi..execute().thenApplyAsync(e -> e, myExecutorService);
`
on each call to commercetools. However, this would clutter the code and can be easily forgotten. Same for any explicit decorator that would be needed.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.