diff options
author | eldritch horrors <pennae@lix.systems> | 2024-04-28 02:04:08 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-05-10 02:21:11 +0200 |
commit | b66451ae7fe12500f135137155c2aae6c406b2da (patch) | |
tree | 8e4200ddf3520e60e7b66a9a068c2379cce2ecc0 /src/libstore/filetransfer.hh | |
parent | 28a98d152c071ec48b8bf510f87ac9710c56d7fb (diff) |
libstore: de-callback-ify FileTransfer
also add a few more tests for exception propagation behavior. using
packaged_tasks and futures (which only allow a single call to a few
of their methods) introduces error paths that weren't there before.
Change-Id: I42ca5236f156fefec17df972f6e9be45989cf805
Diffstat (limited to 'src/libstore/filetransfer.hh')
-rw-r--r-- | src/libstore/filetransfer.hh | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libstore/filetransfer.hh b/src/libstore/filetransfer.hh index e028d7f70..3f55995ef 100644 --- a/src/libstore/filetransfer.hh +++ b/src/libstore/filetransfer.hh @@ -95,10 +95,7 @@ struct FileTransfer * the download. The future may throw a FileTransferError * exception. */ - virtual void enqueueFileTransfer(const FileTransferRequest & request, - Callback<FileTransferResult> callback) = 0; - - std::future<FileTransferResult> enqueueFileTransfer(const FileTransferRequest & request); + virtual std::future<FileTransferResult> enqueueFileTransfer(const FileTransferRequest & request) = 0; /** * Synchronously download a file. |