KDAB / KDBindings

Reactive programming & data binding in C++
281 stars 31 forks source link

multithreading support #69

Closed kshanik closed 2 months ago

kshanik commented 5 months ago

Can we achieve following in KDBindings?

1) signal in thread1 and slots in thread2 2) can it support something Qt provides ? QueuedConnection or BlockingQueuedConnection connection types?

Basically wanted to check if KDBindings support multithreaded property binding evaluation?

seanharmer commented 5 months ago

Hi. Yes this can be done with the ConnectionEvaluator as described at https://www.kdab.com/introducing-the-connectionevaluator-in-kdbindings/

We will also be adding a convenience around this to https://github.com/KDAB/KDUtils

LeonMatthesKDAB commented 5 months ago

Hi @kshanik , as @seanharmer said, signals can be made thread-safe with the use of a ConnectionEvaluator. Blocking connections is also supported.

Your last question is whether property binding evaluation is thread-safe. That is currently not the case. Is that a feature you need?

MiKom commented 2 months ago

@kshanik The convenience around this in KDUtils landed in this commit: https://github.com/KDAB/KDUtils/commit/9104992362df015aa296e6117b5945bf76676781. Available on main branch.

LeonMatthesKDAB commented 2 months ago

Closing this now as multi-threaded signals/slots are supported, and multi-threaded property binding is tracked in #22