be lightweight (no mutexes, no multiple results, no progress reporting, etc)
support co_await (header-only, so QXmpp does not need to depend on C++20)
[x] hashing.cpp: remove unnecessary smart ptrs since QXmppTask can handle move-only types
can't be done, we need to use QFuture because of thread-safety here
[x] cancellation
not needed for now, only hash generation functions use cancellation and they use QFuture anyways because of multi-threading
If you have a look at the implementation of QFuture, it's the opposite of lightweight.
Also it would be nice to enable C++20 users to
co_await
our futures. (Without requiring C++20 or external libraries like QCoro).There's already a prototype branch for this (https://github.com/lnjX/qxmpp/commits/simple-futures).
Requirements:
allow move-only types
be lightweight (no mutexes, no multiple results, no progress reporting, etc)
support
co_await
(header-only, so QXmpp does not need to depend on C++20)[x] hashing.cpp: remove unnecessary smart ptrs since QXmppTask can handle move-only types can't be done, we need to use QFuture because of thread-safety here
[x] cancellation not needed for now, only hash generation functions use cancellation and they use QFuture anyways because of multi-threading
[x] multi-results in client send packet
[x] use QPointer
[x] mam manager: replace qfuture