Skip to content

OkHttpClient enqueue function blocked thread. #8733

Open
@caimo

Description

@caimo

When I use enqueue to asyn my thread, with 2000tps, failed with large thread blocked, In spite of the dispatch thread pool of okhttpclient has been set.

Image

check the code ,found syncronized lock, which will be the main problem.
Image

when I use execute with CompletableFuture and custom thread pool instead of enqueue , the block problem has gone.

maybe enqueue function can be Optimized。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions