1
  1. Does somebody know how to minimize memory usage of QRunnable ? What are the pitfalls in using QRunnable and QThreadPool. I have simple application crawling urls and memory usage is astonishing. It looks like QRunnable objects aren't deleted after execution.

  2. Is there any rational way for doing multithreading in PyQT where you have list of urls to crawl and you want to crawl for example 10 urls at once using threads ? I know how to do it in threading (producer/consumer) but threading doesn't work. QRunnable is so much buggy!

2
  • Is this question still relevant now that you have an answer to stackoverflow.com/questions/21971832/…? Commented Feb 24, 2014 at 16:05
  • I must test this for a while to find out if this is the best solution but i can tell that this is better than QRunnable. Thanks. Commented Feb 24, 2014 at 21:58

1 Answer 1

0

Is there any rational way for doing multithreading in PyQT where you have list of urls to crawl and you want to crawl for example 10 urls at once using threads ?

You can use 10 instances of QWebView in single thread for example. QT is asynchronous and all instances will do there tasks parallelly. See this example. Note, that each QWebView instance eat some memory. If you don't need javascript, just plain HTTP requests, you can use QTextBrowser same way.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.