KDBindings icon indicating copy to clipboard operation
KDBindings copied to clipboard

multithreading support

Open kshanik opened this issue 10 months ago • 2 comments

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?

kshanik avatar Apr 07 '24 09:04 kshanik

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

seanharmer avatar Apr 08 '24 09:04 seanharmer

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?

LeonMatthesKDAB avatar Apr 12 '24 07:04 LeonMatthesKDAB

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

MiKom avatar Jul 31 '24 09:07 MiKom

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

LeonMatthesKDAB avatar Jul 31 '24 11:07 LeonMatthesKDAB