开发者

Insert/delete/retrieve elements of an array across threads without using globals

开发者 https://www.devze.com 2023-02-09 06:44 出处:网络
This might be a silly question, but what\'s the best way to keep insert/delete/retrieve elements of an array in a multi-threaded Python application, but not keep the array global or assign an entire t

This might be a silly question, but what's the best way to keep insert/delete/retrieve elements of an array in a multi-threaded Python application, but not keep the array global or assign an entire thread to keep track of the changes to that singl开发者_JS百科e array? It feels tiresome to pass the array to each function I use.


If you can't use globals, maybe you can use Qt's QThread class. You can use signals to access to the thread.

0

精彩评论

暂无评论...
验证码 换一张
取 消