net.efever.aconcurrent

Enhanced QtConcurrent with AsyncFuture

version 0.1.10

To install:

❯ qpm install net.efever.aconcurrent

Enhanced QtConcurrent based on AsyncFuture

Installation

qpm install net.efever.aconcurrent

API

    #include <aconcurrent.h>

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)

AConcurrent::await(future)

Wait until the input future is finished while keeping the event loop running.

Author

Ben Lau

Info
View on Github

License: APACHE_2_0

Installs
Today 0
This week 2
This month 3
This year 301
Total 301
Dependencies

None.

Versions