1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-04 11:21:47 +02:00

Simplify the callback mechanism

This commit is contained in:
Eelco Dolstra 2018-03-27 22:16:01 +02:00
parent 1672bcd230
commit 81ea8bd5ce
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
16 changed files with 152 additions and 180 deletions

View file

@ -42,8 +42,7 @@ struct Downloader
the download. The future may throw a DownloadError
exception. */
virtual void enqueueDownload(const DownloadRequest & request,
std::function<void(const DownloadResult &)> success,
std::function<void(std::exception_ptr exc)> failure) = 0;
Callback<DownloadResult> callback) = 0;
std::future<DownloadResult> enqueueDownload(const DownloadRequest & request);