Enhanced QtConcurrent based on AsyncFuture
qpm install net.efever.aconcurrent
QFuture AConcurrent::runOnMainThread(Functor functor)
Run a function on main thread. If the current thread is main thread, it will be executed in next tick.
QFuture AConcurrent::mapped(Sequence sequence, Functor worker)
- An implementation of mapped() that support lambda function
- It is cancelable
QFuture AConcurrent::blockingMapped(Sequence sequence, Functor worker)
void AConcurrent::debounce(context, key, future, functor)
Wait until the input future is finished while keeping the event loop running.