Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make network I/O non-blocking #2

Closed
fictorial opened this issue Jun 13, 2010 · 1 comment
Closed

make network I/O non-blocking #2

fictorial opened this issue Jun 13, 2010 · 1 comment

Comments

@fictorial
Copy link

Have you considered making the read/writes non-blocking?

I'd love to be able to use this in a C-based project but it cannot block. I know Redis is fast but still... :)

Something as simple as select(2) would work for readability/writability testing since there's just the one client socket.

Thoughts?

@pietern
Copy link
Contributor

pietern commented Nov 15, 2010

In the new and revamped hiredis, a non-blocking context can be created using redisConnectNonBlock. After that, knowing when to read(2) and write(2) is up to you.

valentinogeron referenced this issue in valentinogeron/hiredis Feb 19, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants