Promises/A+ implementation for Qt/C++
Go to file
Simon Brunel ce3ed72dd4 Promise creation from callback only (resolver)
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>`).
2017-05-20 09:40:42 +02:00
package/features Initial implementation 2017-05-14 19:03:01 +02:00
src Promise creation from callback only (resolver) 2017-05-20 09:40:42 +02:00
tests Promise creation from callback only (resolver) 2017-05-20 09:40:42 +02:00
.gitignore Initial implementation 2017-05-14 19:03:01 +02:00
LICENSE.md Initial implementation 2017-05-14 19:03:01 +02:00
qtpromise.pri Initial implementation 2017-05-14 19:03:01 +02:00
qtpromise.pro Initial implementation 2017-05-14 19:03:01 +02:00
README.md Initial implementation 2017-05-14 19:03:01 +02:00

Promises/A+

QtPromise

Promises/A+ implementation for Qt.

License

QtPromise is available under the MIT license.