diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-11-21 17:12:20 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-11-21 17:12:20 +0900 |
commit | 8ec38f87990cd5355a4cf0cf0533a6459fa2f6e3 (patch) | |
tree | 19bb09f4b63edd1da7ca31eaa12d8c480a0e693b /jobs/generated/leaving.cpp | |
parent | fed4b4fe965a9e2788055b602c7217cb298f5fce (diff) | |
download | libquotient-8ec38f87990cd5355a4cf0cf0533a6459fa2f6e3.tar.gz libquotient-8ec38f87990cd5355a4cf0cf0533a6459fa2f6e3.zip |
Eliminate race condition in Avatar::get()
The race occurred because _ongoingRequest wasn't properly reinitialized if another request on a bigger size arrives while a request for a smaller size is in the air. The old request is now abandoned and continuations are collected inside the Avatar object rather than in the lambda connected to the job. Closes #124.
Along the way, _scaledPixmaps is now std::vector instead of QHash since usually it only contains very few (1 or 2) entries and QHash is a waste of memory for that.
Diffstat (limited to 'jobs/generated/leaving.cpp')
0 files changed, 0 insertions, 0 deletions