Skip to content

In OkHttpEngine builder add executorService field. #1259

Open
@szymonsasin-nordic

Description

@szymonsasin-nordic

Describe the feature

In OkHttpEngine builder give an option to pass own executorService.

Is your feature request related to a problem?

Reusing executorservice should help conserve system resources by avoiding the creation of multiple thread pools. Especially when application is using multiple components that uses threadpools.

Proposed Solution

val commonThreadPool = Executors.newFixedThreadPool(4)
...
OkHttpEngine {
    executorService = commonThreadPool
}

Describe alternative solutions or features you've considered

Another option would be to pass whole Dispatcher instance.

Acknowledge

  • I may be able to implement this feature request

Smithy-Kotlin version

1.4.11

Platform (JVM/JS/Native)

JVM

Operating system and version

NA

Metadata

Metadata

Assignees

Labels

feature-requestA feature should be added or improved.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions