Mpaa added a comment.

Relying on page_put_queue.qsize() > 0 only, as a condition to keep the while loop alive is not safe as the last item in the queue can be fetched by async_manager() before page_put_queue.qsize() is checked and then found empty. In this case _flush() returns before all pending requests are served.
I thought about an additional Queue as form of synchronization. If some other form of feedback of the state of async_manager() is found, that would be also feasible.
Posting my patch for comments.


TASK DETAIL
https://phabricator.wikimedia.org/T147178

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Mpaa
Cc: gerritbot, matej_suchanek, jeblad, Framawiki, Danmichaelo, Zoranzoki21, Dvorapa, Danny_B, Zppix, JAnD, binbot, Aklapper, Mpaa, Xqt, pywikibot-bugs-list, Jrbranaa, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to