<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I have run into this “issue” myself several times, and so far have been able to fill the need using python side tools, but I’ve always wondered: is there a difference in how QtConcurrent works that might make it preferable to the built-in python alternatives? For example, for some of the python multiprocessing functions, the arguments you pass to the function have to be pickleable. If it was possible to make QtConcurrent work, would it work around this limitation? Or if it does threading rather than multiprocessing, would using the Qt API (which is presumably C) get around the GIL limitations of python threading?<div class=""><br class=""></div><div class="">If so, that would be a huge use case for QtConcurrent. If not, then perhaps it is of more limited usefulness, although there is still the argument that using Qt APIs everywhere could make it easier to move between Python and C, if needed for some reason.<br class=""><div class="">
<div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">---</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Israel Brewster<br class="">Software Engineer<br class="">Alaska Volcano Observatory <br class="">Geophysical Institute - UAF <br class="">2156 Koyukuk Drive <br class="">Fairbanks AK 99775-7320</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Work: 907-474-5172<br class="">cell:  907-328-9145</div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On May 25, 2022, at 6:39 AM, Cristián Maureira-Fredes <<a href="mailto:Cristian.Maureira-Fredes@qt.io" class="">Cristian.Maureira-Fredes@qt.io</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">On 5/25/22 15:58, Rute Mendes wrote:<br class=""><blockquote type="cite" class="">Anyway, now I know why there're no examples for PySide, for future reference<br class=""><a href="https://stackoverflow.com/questions/32378719/qtconcurrent-in-pyside-pyqt" class="">https://stackoverflow.com/questions/32378719/qtconcurrent-in-pyside-pyqt</a> <<a href="https://stackoverflow.com/questions/32378719/qtconcurrent-in-pyside-pyqt" class="">https://stackoverflow.com/questions/32378719/qtconcurrent-in-pyside-pyqt</a>><br class="">Thanks.<br class="">Rute<br class="">A segunda, 23/05/2022, 13:20, Rute Mendes <<a href="mailto:rutepfmendes@gmail.com" class="">rutepfmendes@gmail.com</a> <<a href="mailto:rutepfmendes@gmail.com" class="">mailto:rutepfmendes@gmail.com</a>>> escreveu:<br class="">    Hi!<br class="">    I've installed PySide6 but looking at docs there's no run method<br class="">    implementation for QtConcurrent. What are the alternatives according<br class="">    PySide availability, QtConcurrent, QFutureBaseInterface? ( and I<br class="">    can't find examples only for PySide ).<br class="">    Regards,<br class="">    Rute<br class=""></blockquote><br class="">Hello Rute,<br class=""><br class="">Due to the same reason you see there, that it's a namespace<br class="">we have been exploring how we could still expose at least a version<br class="">of the many overloads of functions like mappedReduced.<br class=""><br class="">Another challenge, is that most of the QtConcurrent is heavily templated<br class="">what makes it a bit more tricky to expose to Python.<br class=""><br class="">Out of curiosity,<br class="">have you tried to use Python-only options to achieve your goal?<br class="">not that I'm challenging the existence of QtConcurrent,<br class="">but I would like to understand the usage of the module over<br class="">some other options like:<br class=""><br class="">threading, multiprocessing, concurrent.futures, etc<br class=""><a href="https://docs.python.org/3/library/concurrency.html" class="">https://docs.python.org/3/library/concurrency.html</a><br class=""><br class="">If having a Qt-API to handle concurrency is your motivation,<br class="">is a valid motivation IMHO :) or if QtConcurrent<br class="">is solving a problem that Python haven't solve yet<br class="">could be nice to know as well.<br class=""><br class="">Cheers<br class=""><br class="">-- <br class="">Dr. Cristian Maureira-Fredes<br class="">R&D Manager<br class=""><br class="">The Qt Company GmbH<br class="">Erich-Thilo-Str. 10<br class="">D-12489 Berlin<br class=""><br class="">Geschäftsführer: Mika Pälsi,<br class="">Juha Varelius, Mika Harjuaho<br class="">Sitz der Gesellschaft: Berlin,<br class="">Registergericht: Amtsgericht<br class="">Charlottenburg, HRB 144331 B<br class="">--<br class="">_______________________________________________<br class="">PySide mailing list<br class="">PySide@qt-project.org<br class="">https://lists.qt-project.org/listinfo/pyside<br class=""></div></div></blockquote></div><br class=""></div></body></html>