Skip to content

new background downloader

Colin Macdonald requested to merge backgd_downloader into main

Some old work on a proper background downloader with threads and stuff.

todo

  • the idea is downloads are supposed to be flaky
  • currently harded to fail with some probability and take random amounts of time.
    • REMOVE BEFORE MERGING
  • display a placeholder image while things are downloading
  • separate code into its own file/module
  • some reasonable interaction in a threadsafe way with the pagecache.
  • better placeholder graphic: filed #2357
  • try at most say 3 times before failing outright: don't like the idea of buggy stuff endlessly redownloading in the background
  • ctrl-R dialog does blocking downloads of any pages we don't yet have (same is in main)
    • could port Ctrl-R dialog for lazy download, or leave for a future MR (probably defer, that code is hard to edit, #2355)
    • port other pop-ups to lazy downloads (or again, leave for future MR) (Filed #2356)
  • this does not try to fix/change anything about uploads.
  • poolsize should be fixed at say 2
  • is there some lock state where Marker doesn't get a thread?
    • is the threadpool reclaining the marker thread?
  • stopping:
    • Downloader has a "clear queue" method
    • Downloader has a stop/wait method
    • Marker versus Chooser: who should be waiting? What about shared downloader? filed #2359 (closed)
Edited by Colin Macdonald

Merge request reports