Comments (2)
Thanks @geiseri
It sounds like a good addition and I may already have some code for map
and filter
that follows the bluebird API (still need to write tests and docs and make sure the public API is robust enough). These methods also need to handle promise results:
QPromise<QByteArray>::all(promises)
.map([](const QByteArray& a) {
return QPromise<QJsonObject>([](...) {
// async ...
});
})
.filter([](const QJsonObject& o) {
return QPromise<bool>([](...) {
// async ...
});
})
// ...
from qtpromise.
All these methods are now implemented:
- each: since v0.4.0 (051fed5)
- filter: since v0.4.0 (4fa7a37)
- map: since v0.4.0 (69c0785)
- reduce: since v0.5.0 (e3f0f05)
from qtpromise.
Related Issues (20)
- Awaiting QtPromises of different type HOT 1
- Support for promise cancellation HOT 7
- How can I flatten nested promises? HOT 3
- promise handler does not forward unique_ptr HOT 7
- Support for class member functions in then() HOT 5
- Question about xxx and xxxBase classes
- When using QtPromise::all a following fail and finally are not called HOT 3
- Question about executing context HOT 16
- Qt 6 name conflict HOT 11
- "Getting Started" section for CMake could be improved HOT 1
- Memory accumulation with QtPromise timeouts and QNetworkAccessManager HOT 2
- invalid use of incomplete type: QPromiseConversionException in qpromise_p.h HOT 5
- API question: Is there value_or(...) equivalent? HOT 7
- The QObject::deleteLater() in .then doesn't work. HOT 3
- QPromise<QString>::reject can't work in the chain, console only print "foo", i wish it is "foo" and "l2-reject l1-reject" HOT 2
- Invalid thread pointer crash in qtpromise_defer() HOT 10
- Release Candidate for v0.7.0 HOT 1
- Different .then behavior than expected HOT 2
- Does not work in a Qt dll loaded by non-Qt app HOT 1
- How to connect to a signal with specific argument? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qtpromise.