Code review comment for lp:~marcustomlinson/unity-scopes-api/lp-1267917-2

Revision history for this message
Michal Hruby (mhr3) wrote :

> Naturally then, as we now have a QThread available, we can use this thread to
> create, use and destroy the manager_ and reply_ HttpClientQtThread members
> (req.4). Lastly, because we need to access the reply_ object after it is
> assigned but before it is destroyed, we need to suspend the QThread until
> HttpClientQtThread signals it to exit (on destruction).

I wouldn't agree here, all the worker is asked to do is to return whether the http request succeeded plus a memory buffer with the reply, there's absolutely no need to keep the reply_ object alive as long as these two properties are stored somewhere. And then the inversion goes away.

I still disagree with using a thread per-request, but that's outside of scope of this MP.

« Back to merge proposal