[PyQt] PyQt5 + Python 3: passing lists, dicts as signal arguments across threads
alan.ezust at gmail.com
Wed Sep 24 20:44:15 BST 2014
In C++, I pass QList and QMap by value as signal arguments and I know that
there will be lazy copy on write, and I can safely use the variables of
these types when needed. And if I pass by pointer or reference, I know I
need to protect concurrent access to it.
In PyQt5, there is no QList or QMap, and it seems the list and dict
built-ins are automatically converted to/from QList/QMap when needed.
Which is nice.
So now my question is, when a list or dict is passed as a signal argument
across thread boundaries, what happens? Is it passed by reference? If so,
do we need to protect it from access in the other thread?
Or does it behave like QList and QMap and have lazy copy on write?
Is this documented somewhere?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt