Comment 5 for bug 638938

Revision history for this message
Maia Everett (linneris) wrote :

My main concern about ThrottledInputStream is Thread.usleep. It would make sense in an application where every file is downloaded in its own thread, but Steadyflow is a single-threaded application that uses the _async API, and freezing the thread will freeze all downloads and the UI.

Theoretically we could use timers and yield in the async download method to accomplish the effect of Thread.usleep using just the Vala async mechanics. At this point I'm not sure if it's worth rewriting the GIO backend to use threads instead of async.