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:
parent
1672bcd230
commit
81ea8bd5ce
16 changed files with 152 additions and 180 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue