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

Completion Handler for Async Downloads? #53

Closed
@Fishwaldo

Description

@Fishwaldo

With the current design of returning the response class as a Future in the client.get, it effectively negates any benefit of the Async abilities, as you still have to sit there polling the future to determine when the transfers are complete.

It would be great if you could add something like client.async_wait() to cpp-netlib so that we can get a call back when the download is completed.

(I'm guessing the async_wait could just as easily call wait on the future in a thread (or strand?)) and then call the handler when completed?)

As it stands right now, it makes client code all that much more complex if you want to implement true async, non-blocking or non-polling code.

I've tried to implement my own service in ASIO to do this, but alas, the ASIO code is above my C++ ability, and cpp-netlib is even more complex :)

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp