[Qt-interest] Best practices for a thread object
Richard Moore
richmoore44 at gmail.com
Sun Jan 16 20:49:40 CET 2011
On Sun, Jan 16, 2011 at 6:26 PM, Arnold Krille <arnold at arnoldarts.de> wrote:
> On Sunday 16 January 2011 17:23:20 Etienne Sandré-Chardonnal wrote:
>> Thanks to both, I understand the new approach.
>>
>> The QT doc definitely needs to be refreshed regarding QThreads...
>
> Actually the docs about QThread and multi-threading and QtConcurrent are very
> good since quite some years (since the public release of these
> classes/modules). Its users of these classes not reading and understanding the
> docs. And that you can't fix with writing more documentation...
Unfortunately that's not the case. The original model used by QThread
required you to subclass it which is no longer recommended. In fact if
you look at the 4.7 docs, they provide examples of doing exactly what
Brad has told us not to do. In fact if you look at the example, it
also suggests using threads in order to do networking, which again is
not recommended. If the first example in the documentation doesn't
follow what is being suggested as best practice, then it's hardly a
surprise that people using the library do not. The docs here are
frankly poor and need a complete rework.
Rich.
More information about the Qt-interest-old
mailing list