Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Introduce client pool#83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
picanumber wants to merge2 commits intocpp-redis:masterfrompicanumber:client_pool
Closed

Introduce client pool#83

picanumber wants to merge2 commits intocpp-redis:masterfrompicanumber:client_pool

Conversation

@picanumber
Copy link

@picanumberpicanumber commentedSep 25, 2021
edited
Loading

The client pool is used to create the desired number of client instances which are accessible in a thread safe fashion.

Different threads can assign a task to the pool, by calling the::run method; this is a method that accepts a callback with a signature<Ret(client *)> whereRet is any type. Inside that callback, the provided client is accessed in a thread safe manner.

Selection of an idle client from the pool is done in a round robin fashion and will wait to find an idle "worker" when all clients in the pool are busy.

Also added an example.

The client pool is used to create the desired number of client instanceswhich are accessible in a thread safe fashion.
@picanumberpicanumber mentioned this pull requestSep 25, 2021
@picanumberpicanumber closed this by deleting the head repositoryOct 19, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@picanumber

[8]ページ先頭

©2009-2026 Movatter.jp