On Wed, Dec 10, 2014 at 12:07 AM, iMath <2281570...@qq.com> wrote:

> I think the user interface shouldn't be freezed when using
> concurrent.futures.ThreadPoolExecutor here, but it doesn't meet my
> expectations,anyone can explain why ? any other solutions here to not let
> user interface freezed?‍
>
> code is here
>
> http://stackoverflow.com/questions/27393533/user-interface-freezed-when-using-concurrent-futures-threadpoolexecutor
> ‍
> <http://stackoverflow.com/questions/27393533/user-interface-freezed-when-using-concurrent-futures-threadpoolexecutor>
>
> _______________________________________________
> PyQt mailing list    p...@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>

It appears: concurrent.futures.as_completed yields futures as they
complete, so the main thread is blocked as it loops over this until all the
futures have completed.

You could use Qt's QNetworkAccessManager / QNetworkRequest, or perhaps you
want something like scrapy if you're trying to crawl websites (could
probably be integrated with a Qt app using qt4reactor)

What are you building?

- MH
_______________________________________________
PySide mailing list
PySide@qt-project.org
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to