hind
25th October 2013, 09:30
I have some big data to share between threads. While I don't want to use locks and unlocks everywhere, I chose the signal/slot pattern.
The best way I can think of is like:
emit updateData(const MyData &d)
But it's suggested that this avoids copying with DirectConnection but stills makes a copy with QueuedConnection. So what about BlockingQueuedConnection, which blocks and may work as a lock? If this is same with QueuedConnection for multi-thread, is there a way?
Thanks in advance!
The best way I can think of is like:
emit updateData(const MyData &d)
But it's suggested that this avoids copying with DirectConnection but stills makes a copy with QueuedConnection. So what about BlockingQueuedConnection, which blocks and may work as a lock? If this is same with QueuedConnection for multi-thread, is there a way?
Thanks in advance!