mirror of
https://github.com/simonbrunel/qtpromise.git
synced 2024-11-22 02:34:30 +08:00
Promises/A+ implementation for Qt/C++
ce3ed72dd4
Make sure that the promise state can only be changed by the promise producer (and not consumers) by removing the `fulfill` and `reject` methods from the instance members and introducing a new constructor accepting a resolver lambda. That also means that a promise can't anymore be default constructed. Add the static `QPromise<T>::resolve` and `QPromise<T>::reject` methods to create synchronously fulfilled or rejected promises, and fix the `qPromise` helper to handle deduced promises (e.g. `qPromise(QFuture<int>()) -> QPromise<int>`). |
||
---|---|---|
package/features | ||
src | ||
tests | ||
.gitignore | ||
LICENSE.md | ||
qtpromise.pri | ||
qtpromise.pro | ||
README.md |