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:
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?Qt Code:
emit updateData(const MyData &d)To copy to clipboard, switch view to plain text mode
Thanks in advance!
Bookmarks