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

Document that blocking and async do not mix #1159

Merged

Commits on Feb 5, 2021

  1. Document that blocking and async do not mix

    See discussion on seanmonstar#1017. This patch adds documentation to `blocking` at
    module level and to its `Client::new` and `ClientBuilder::build`, noting
    that you can’t create or use a blocking client from within an async
    runtime, and suggesting potential alternatives.
    
    Presumably, all the other methods on `Client` also have this property,
    but hitting the failure mode would require building a `blocking::Client`
    outside an async runtime and then moving it into a runtime to send
    requests; seems potentially not worth polluting all the docs.
    
    Test Plan:
    Ran `cargo doc --features blocking` and verified that the links work.
    
    wchargin-branch: docs-blocking-no-async
    wchargin-source: 0eb36352959cd2ca0b19df5836e75230dc619b9d
    wchargin committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    31122bf View commit details
    Browse the repository at this point in the history